13 #ifndef CIRCT_DIALECT_FIRRTL_FIRRTLATTRIBUTES_H
14 #define CIRCT_DIALECT_FIRRTL_FIRRTLATTRIBUTES_H
48 static inline StringRef
toString(
bool direction) {
55 ArrayRef<Direction> directions);
60 ArrayRef<bool> directions);
64 SmallVector<Direction>
unpackAttribute(mlir::DenseBoolArrayAttr directions);
70 #define GET_ATTRDEF_CLASSES
71 #include "circt/Dialect/FIRRTL/FIRRTLAttributes.h.inc"
mlir::DenseBoolArrayAttr packAttribute(MLIRContext *context, ArrayRef< Direction > directions)
Return a DenseBoolArrayAttr containing the packed representation of an array of directions.
static bool unGet(Direction dir)
Convert from Direction to bool. The opposite of get;.
Direction flip(Direction direction)
Flip a port direction.
SmallVector< Direction > unpackAttribute(mlir::DenseBoolArrayAttr directions)
Turn a packed representation of port attributes into a vector that can be worked with.
static Direction get(bool isOutput)
Return an output direction if isOutput is true, otherwise return an input direction.
static StringRef toString(Direction direction)
Direction
This represents the direction of a single port.
llvm::raw_ostream & operator<<(llvm::raw_ostream &os, const InstanceInfo::LatticeValue &value)
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.