14 #ifndef CIRCT_CONVERSION_HWTOLLVM_HWTOLLVM_H
15 #define CIRCT_CONVERSION_HWTOLLVM_HWTOLLVM_H
22 class LLVMTypeConverter;
46 mlir::LLVMTypeConverter &converter, RewritePatternSet &
patterns,
48 DenseMap<std::pair<Type, ArrayAttr>, mlir::LLVM::GlobalOp>
49 &constAggregateGlobalsMap);
A namespace that is used to store existing names and generate new names in some scope within the IR.
This file defines an intermediate representation for circuits acting as an abstraction for constraint...
void populateHWToLLVMConversionPatterns(mlir::LLVMTypeConverter &converter, RewritePatternSet &patterns, Namespace &globals, DenseMap< std::pair< Type, ArrayAttr >, mlir::LLVM::GlobalOp > &constAggregateGlobalsMap)
Get the HW to LLVM conversion patterns.
std::unique_ptr< OperationPass< ModuleOp > > createConvertHWToLLVMPass()
Create an HW to LLVM conversion pass.
void populateHWToLLVMTypeConversions(mlir::LLVMTypeConverter &converter)
Get the HW to LLVM type conversions.
static uint32_t convertToLLVMEndianess(Type type, uint32_t index)
Convert an index into a HW ArrayType or StructType to LLVM Endianess.
static uint32_t llvmIndexOfStructField(hw::StructType type, StringRef fieldName)
Get the index of a specific StructType field in the LLVM lowering of the StructType.