CIRCT 23.0.0git
Loading...
Searching...
No Matches
Namespaces | Functions
FormatInteger.h File Reference
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/raw_ostream.h"
#include <cmath>
Include dependency graph for FormatInteger.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  circt
 The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
 

Functions

unsigned circt::getDecimalDigitWidth (unsigned bits, bool isSigned)
 Number of decimal digits required to print the largest value of an integer type of the given bit width.
 
unsigned circt::getNaturalIntegerWidth (unsigned bits, unsigned radix, bool isSigned)
 Natural field width of an integer type printed in the given radix: the number of digits required to print the type's largest value.
 
void circt::formatInteger (llvm::raw_ostream &os, const llvm::APInt &value, unsigned radix, bool isUpperCase, bool isLeftAligned, char paddingChar, std::optional< int32_t > specifierWidth, bool isSigned)
 Format value in the given radix and emit it to os, padded to a field width.