|
CIRCT 22.0.0git
|
#include "circt/Dialect/FIRRTL/FIRRTLOps.h"#include "circt/Dialect/FIRRTL/FIRRTLTypes.h"#include "circt/Dialect/FIRRTL/FIRRTLUtils.h"#include "circt/Dialect/FIRRTL/Passes.h"#include "circt/Support/Debug.h"#include "circt/Support/FieldRef.h"#include "mlir/IR/Threading.h"#include "mlir/Pass/Pass.h"#include "llvm/ADT/APSInt.h"#include "llvm/ADT/DenseSet.h"#include "llvm/ADT/Hashing.h"#include "llvm/ADT/SetVector.h"#include "llvm/Support/Debug.h"#include "llvm/Support/ErrorHandling.h"#include "circt/Dialect/FIRRTL/Passes.h.inc"
Go to the source code of this file.
Namespaces | |
| namespace | circt |
| The InstanceGraph op interface, see InstanceGraphInterface.td for more details. | |
| namespace | circt::firrtl |
| namespace | mlir |
Macros | |
| #define | DEBUG_TYPE "infer-widths" |
| #define | GEN_PASS_DEF_INFERWIDTHS |
| #define | EXPR_NAMES(x) Var##x, Derived##x, Id##x, Known##x, Add##x, Pow##x, Max##x, Min##x |
| #define | EXPR_KINDS EXPR_NAMES() |
| #define | EXPR_CLASSES EXPR_NAMES(Expr) |
Typedefs | |
| using | ExprSolution = std::pair< std::optional< int32_t >, bool > |
Functions | |
| static void | diagnoseUninferredType (InFlightDiagnostic &diag, Type t, Twine str) |
| static uint64_t | convertFieldIDToOurVersion (uint64_t fieldID, FIRRTLType type) |
| Calculate the "InferWidths-fieldID" equivalent for the given fieldID + type. | |
| template<typename T , typename std::enable_if< std::is_base_of< Expr, T >::value, int >::type = 0> | |
| llvm::raw_ostream & | operator<< (llvm::raw_ostream &os, const T &e) |
Allow rvalue refs to Expr and subclasses to be printed to streams. | |
| template<typename T , typename std::enable_if< std::is_base_of< Expr, T >::value, int >::type = 0> | |
| llvm::hash_code | mlir::hash_value (const T &e) |
| llvm::raw_ostream & | operator<< (llvm::raw_ostream &os, const LinIneq &l) |
| static ExprSolution | computeUnary (ExprSolution arg, llvm::function_ref< int32_t(int32_t)> operation) |
| static ExprSolution | computeBinary (ExprSolution lhs, ExprSolution rhs, llvm::function_ref< int32_t(int32_t, int32_t)> operation) |
| static ExprSolution | solveExpr (Expr *expr, SmallPtrSetImpl< Expr * > &seenVars, std::vector< Frame > &worklist) |
Compute the value of a constraint expr. | |
| static bool | hasUninferredWidth (Type type) |
| Check if a type contains any FIRRTL type with uninferred widths. | |
| static FIRRTLBaseType | resizeType (FIRRTLBaseType type, uint32_t newWidth) |
Resize a uint, sint, or analog type to a specific width. | |
| #define DEBUG_TYPE "infer-widths" |
Definition at line 28 of file InferWidths.cpp.
| #define EXPR_CLASSES EXPR_NAMES(Expr) |
Definition at line 113 of file InferWidths.cpp.
| #define EXPR_KINDS EXPR_NAMES() |
Definition at line 112 of file InferWidths.cpp.
| #define EXPR_NAMES | ( | x | ) | Var##x, Derived##x, Id##x, Known##x, Add##x, Pow##x, Max##x, Min##x |
Definition at line 110 of file InferWidths.cpp.
| #define GEN_PASS_DEF_INFERWIDTHS |
Definition at line 32 of file InferWidths.cpp.
| using ExprSolution = std::pair<std::optional<int32_t>, bool> |
Definition at line 842 of file InferWidths.cpp.
|
static |
Definition at line 852 of file InferWidths.cpp.
Referenced by solveExpr().
|
static |
Definition at line 845 of file InferWidths.cpp.
Referenced by solveExpr().
|
static |
Calculate the "InferWidths-fieldID" equivalent for the given fieldID + type.
Definition at line 65 of file InferWidths.cpp.
References circt::hw::FieldIdImpl::getSubTypeByFieldID().
|
static |
Definition at line 47 of file InferWidths.cpp.
References diagnoseUninferredType().
Referenced by diagnoseUninferredType().
|
static |
Check if a type contains any FIRRTL type with uninferred widths.
Definition at line 1290 of file InferWidths.cpp.
|
inline |
Definition at line 739 of file InferWidths.cpp.
|
inline |
Allow rvalue refs to Expr and subclasses to be printed to streams.
Definition at line 95 of file InferWidths.cpp.
|
static |
Resize a uint, sint, or analog type to a specific width.
Definition at line 2138 of file InferWidths.cpp.
References circt::firrtl::FIRRTLTypeSwitch< T, ResultT >::Case(), and circt::firrtl::FIRRTLBaseType::isConst().
|
static |
Compute the value of a constraint expr.
seenVars is used as a recursion breaker. Recursive variables are treated as zero. Returns the computed value and a boolean indicating whether a recursion was detected. This may be used to memoize the result of expressions in case they were not involved in a cycle (which may alter their value from the perspective of a variable).
Definition at line 878 of file InferWidths.cpp.
References computeBinary(), and computeUnary().