clang 24.0.0git
cir::direct::ConvertCIRToLLVMPass Struct Reference
Inheritance diagram for cir::direct::ConvertCIRToLLVMPass:
[legend]

Public Member Functions

void getDependentDialects (mlir::DialectRegistry &registry) const override
void runOnOperation () final
void processCIRAttrs (mlir::ModuleOp module)
void resolveBlockAddressOp (LLVMBlockAddressInfo &blockInfoAddr)
void collectGlobalAnnotations (mlir::ModuleOp module)
 Collect (symbol_name, annotations, loc) from cir.func and cir.global ops before the conversion runs (the annotations attribute is dropped during FuncOp/GlobalOp lowering).
void buildGlobalAnnotationsVar (mlir::ModuleOp module)
 Emit @llvm.global.annotations and supporting string/args constants from the previously-collected annotations.
StringRef getDescription () const override
StringRef getArgument () const override

Detailed Description

Definition at line 1149 of file LowerToLLVM.cpp.

Member Function Documentation

◆ buildGlobalAnnotationsVar()

void cir::direct::ConvertCIRToLLVMPass::buildGlobalAnnotationsVar ( mlir::ModuleOp module)

Emit @llvm.global.annotations and supporting string/args constants from the previously-collected annotations.

Mirrors what OGCG produces.

Definition at line 4349 of file LowerToLLVM.cpp.

References buildGlobalAnnotationsVar().

Referenced by buildGlobalAnnotationsVar(), and runOnOperation().

◆ collectGlobalAnnotations()

void cir::direct::ConvertCIRToLLVMPass::collectGlobalAnnotations ( mlir::ModuleOp module)

Collect (symbol_name, annotations, loc) from cir.func and cir.global ops before the conversion runs (the annotations attribute is dropped during FuncOp/GlobalOp lowering).

Definition at line 4329 of file LowerToLLVM.cpp.

Referenced by runOnOperation().

◆ getArgument()

StringRef cir::direct::ConvertCIRToLLVMPass::getArgument ( ) const
inlineoverride

Definition at line 1175 of file LowerToLLVM.cpp.

◆ getDependentDialects()

void cir::direct::ConvertCIRToLLVMPass::getDependentDialects ( mlir::DialectRegistry & registry) const
inlineoverride

Definition at line 1152 of file LowerToLLVM.cpp.

◆ getDescription()

StringRef cir::direct::ConvertCIRToLLVMPass::getDescription ( ) const
inlineoverride

Definition at line 1171 of file LowerToLLVM.cpp.

References getDescription().

Referenced by getDescription().

◆ processCIRAttrs()

void cir::direct::ConvertCIRToLLVMPass::processCIRAttrs ( mlir::ModuleOp module)

◆ resolveBlockAddressOp()

◆ runOnOperation()

void cir::direct::ConvertCIRToLLVMPass::runOnOperation ( )
final

Tracks the state required to lower CIR LabelOp and BlockAddressOp. Maps labels to their corresponding BlockTagOp and keeps bookkeeping of unresolved BlockAddressOps until they are matched with the corresponding BlockTagOp in resolveBlockAddressOp.

Cached symbol table collection used by call lowering patterns to avoid repeated O(M) module-wide symbol scans for every call site.

Definition at line 4479 of file LowerToLLVM.cpp.

References cir::direct::buildCtorDtorList(), buildGlobalAnnotationsVar(), collectGlobalAnnotations(), cir::collectUnreachable(), cir::direct::prepareTypeConverter(), processCIRAttrs(), resolveBlockAddressOp(), and runOnOperation().

Referenced by runOnOperation().


The documentation for this struct was generated from the following file: