MLIR  16.0.0git
Functions
mlir::cf Namespace Reference

Functions

void populateControlFlowToLLVMConversionPatterns (LLVMTypeConverter &converter, RewritePatternSet &patterns)
 Collect the patterns to convert from the ControlFlow dialect to LLVM. More...
 
std::unique_ptr< PasscreateConvertControlFlowToLLVMPass ()
 Creates a pass to convert the ControlFlow dialect into the LLVMIR dialect. More...
 
void populateControlFlowToSPIRVPatterns (SPIRVTypeConverter &typeConverter, RewritePatternSet &patterns)
 Appends to a pattern list additional patterns for translating ControlFLow ops to SPIR-V ops. More...
 

Function Documentation

◆ createConvertControlFlowToLLVMPass()

std::unique_ptr< Pass > mlir::cf::createConvertControlFlowToLLVMPass ( )

Creates a pass to convert the ControlFlow dialect into the LLVMIR dialect.

Definition at line 227 of file ControlFlowToLLVM.cpp.

◆ populateControlFlowToLLVMConversionPatterns()

void mlir::cf::populateControlFlowToLLVMConversionPatterns ( LLVMTypeConverter converter,
RewritePatternSet patterns 
)

Collect the patterns to convert from the ControlFlow dialect to LLVM.

The conversion patterns capture the LLVMTypeConverter by reference meaning the references have to remain alive during the entire pattern lifetime.

Definition at line 187 of file ControlFlowToLLVM.cpp.

References mlir::RewritePatternSet::add(), mlir::applyPartialConversion(), mlir::failed(), mlir::kDeriveIndexBitwidthFromDataLayout, options, and mlir::LowerToLLVMOptions::overrideIndexBitwidth().

Referenced by canBeCalledWithBarePointers(), mlir::populateFuncToLLVMConversionPatterns(), and mlir::populateOpenMPToLLVMConversionPatterns().

◆ populateControlFlowToSPIRVPatterns()

void mlir::cf::populateControlFlowToSPIRVPatterns ( SPIRVTypeConverter typeConverter,
RewritePatternSet patterns 
)

Appends to a pattern list additional patterns for translating ControlFLow ops to SPIR-V ops.

Definition at line 67 of file ControlFlowToSPIRV.cpp.

References mlir::RewritePatternSet::add(), and mlir::RewritePatternSet::getContext().