#include <MlirToJlmConverter.hpp>
|
| ::llvm::SmallVector< jlm::rvsdg::Output * > | ConvertRegion (::mlir::Region ®ion, rvsdg::Region &rvsdgRegion) |
| |
| ::llvm::SmallVector< jlm::rvsdg::Output * > | ConvertBlock (::mlir::Block &block, rvsdg::Region &rvsdgRegion) |
| |
| static ::llvm::SmallVector< jlm::rvsdg::Output * > | GetConvertedInputs (::mlir::Operation &mlirOp, const std::unordered_map< void *, rvsdg::Output * > &outputMap) |
| |
| rvsdg::Node * | ConvertCmpIOp (::mlir::arith::CmpIOp &CompOp, const ::llvm::SmallVector< rvsdg::Output * > &inputs, size_t nbits) |
| |
| rvsdg::Node * | ConvertICmpOp (::mlir::LLVM::ICmpOp &operation, rvsdg::Region &rvsdgRegion, const ::llvm::SmallVector< rvsdg::Output * > &inputs) |
| |
| rvsdg::Node * | ConvertFPBinaryNode (const ::mlir::Operation &mlirOperation, const ::llvm::SmallVector< rvsdg::Output * > &inputs) |
| |
| jlm::llvm::fpcmp | TryConvertFPCMP (const ::mlir::arith::CmpFPredicate &op) |
| |
| rvsdg::Node * | ConvertBitBinaryNode (::mlir::Operation &mlirOperation, const ::llvm::SmallVector< rvsdg::Output * > &inputs) |
| |
| std::vector< jlm::rvsdg::Output * > | ConvertOperation (::mlir::Operation &mlirOperation, rvsdg::Region &rvsdgRegion, const ::llvm::SmallVector< rvsdg::Output * > &inputs) |
| |
| llvm::fpsize | ConvertFPSize (unsigned int size) |
| |
| llvm::Linkage | ConvertLinkage (std::string stringValue) |
| |
| std::unique_ptr< llvm::LlvmRvsdgModule > | ConvertOmega (::mlir::rvsdg::OmegaNode &omegaNode) |
| |
| rvsdg::Node * | ConvertLambda (::mlir::Operation &mlirLambda, rvsdg::Region &rvsdgRegion, const ::llvm::SmallVector< rvsdg::Output * > &inputs) |
| |
| std::shared_ptr< const rvsdg::Type > | ConvertType (const ::mlir::Type &type) |
| |
Definition at line 30 of file MlirToJlmConverter.hpp.
◆ MlirToJlmConverter() [1/3]
| jlm::mlir::MlirToJlmConverter::MlirToJlmConverter |
( |
| ) |
|
|
inline |
◆ MlirToJlmConverter() [2/3]
◆ MlirToJlmConverter() [3/3]
◆ ConvertBitBinaryNode()
| rvsdg::Node * jlm::mlir::MlirToJlmConverter::ConvertBitBinaryNode |
( |
::mlir::Operation & |
mlirOperation, |
|
|
const ::llvm::SmallVector< rvsdg::Output * > & |
inputs |
|
) |
| |
|
private |
Converts an MLIR integer binary operation into an RVSDG node.
- Parameters
-
| mlirOperation | The MLIR operation to be converted. |
| inputs | The inputs for the RVSDG node. |
- Returns
- The converted RVSDG node OR nullptr if the operation cannot be casted to an operation
Definition at line 321 of file MlirToJlmConverter.cpp.
◆ ConvertBlock()
Converts the MLIR block and all operations in it
- Parameters
-
| block | The MLIR block to the converted |
| rvsdgRegion | The corresponding RVSDG region that will be populated with all the contents of the MLIR region. |
- Returns
- The results of the region are returned as a std::vector
Definition at line 99 of file MlirToJlmConverter.cpp.
◆ ConvertCmpIOp()
| rvsdg::Node * jlm::mlir::MlirToJlmConverter::ConvertCmpIOp |
( |
::mlir::arith::CmpIOp & |
CompOp, |
|
|
const ::llvm::SmallVector< rvsdg::Output * > & |
inputs, |
|
|
size_t |
nbits |
|
) |
| |
|
private |
Converts an MLIR arith integer comparison operation into an RVSDG node.
- Parameters
-
| CompOp | The MLIR comparison operation to be converted. |
| inputs | The inputs for the RVSDG node. |
| nbits | The number of bits in the comparison. |
- Returns
- The converted RVSDG node.
Definition at line 155 of file MlirToJlmConverter.cpp.
◆ ConvertFPBinaryNode()
| rvsdg::Node * jlm::mlir::MlirToJlmConverter::ConvertFPBinaryNode |
( |
const ::mlir::Operation & |
mlirOperation, |
|
|
const ::llvm::SmallVector< rvsdg::Output * > & |
inputs |
|
) |
| |
|
private |
Converts an MLIR floating point binary operation into an RVSDG node.
- Parameters
-
| mlirOperation | The MLIR operation to be converted. |
| inputs | The inputs for the RVSDG node. |
- Returns
- The converted RVSDG node OR nullptr if the operation cannot be casted to an operation
Definition at line 273 of file MlirToJlmConverter.cpp.
◆ ConvertFPSize()
| llvm::fpsize jlm::mlir::MlirToJlmConverter::ConvertFPSize |
( |
unsigned int |
size | ) |
|
|
private |
◆ ConvertICmpOp()
Converts an MLIR LLVM integer comparison operation into an RVSDG node.
- Parameters
-
| operation | The MLIR comparison operation to be converted. |
| rvsdgRegion | The RVSDG region that the generated RVSDG node is inserted into. |
| inputs | The inputs for the RVSDG node. |
- Returns
- The converted RVSDG node.
Definition at line 207 of file MlirToJlmConverter.cpp.
◆ ConvertLambda()
Converts an MLIR lambda operation and inserts it into an RVSDG region.
- Parameters
-
| mlirLambda | The MLIR lambda opeation to the converted |
| rvsdgRegion | The RVSDG region that the lambda node will reside in. |
| inputs | The inputs for the RVSDG node. |
- Returns
- The converted Lambda node.
Definition at line 1081 of file MlirToJlmConverter.cpp.
◆ ConvertLinkage()
| llvm::Linkage jlm::mlir::MlirToJlmConverter::ConvertLinkage |
( |
std::string |
stringValue | ) |
|
|
private |
Converts a string representing a linkage to jlm::llvm::linkage.
- Parameters
-
| stringValue | The string to be converted. |
- Returns
- The linkage.
Definition at line 1030 of file MlirToJlmConverter.cpp.
◆ ConvertMlir()
| std::unique_ptr< llvm::LlvmRvsdgModule > jlm::mlir::MlirToJlmConverter::ConvertMlir |
( |
std::unique_ptr<::mlir::Block > & |
block | ) |
|
Converts the MLIR block and all operations in it, including their respective regions.
- Parameters
-
| block | The RVSDG MLIR block to be converted. |
- Returns
- The converted RVSDG graph.
Definition at line 41 of file MlirToJlmConverter.cpp.
◆ ConvertOmega()
| std::unique_ptr< llvm::LlvmRvsdgModule > jlm::mlir::MlirToJlmConverter::ConvertOmega |
( |
::mlir::rvsdg::OmegaNode & |
omegaNode | ) |
|
|
private |
Converts an MLIR omega operation and insterst it into an RVSDG region.
- Parameters
-
| omegaNode | The MLIR omega opeation to the converted |
- Returns
- The converted RVSDG graph.
Definition at line 63 of file MlirToJlmConverter.cpp.
◆ ConvertOperation()
Converts an MLIR operation into an RVSDG node.
- Parameters
-
| mlirOperation | The MLIR operation to be converted. |
| rvsdgRegion | The RVSDG region that the generated RVSDG node is inserted into. |
| inputs | The inputs for the RVSDG node. |
- Returns
- The outputs of the RVSDG node.
Here we connect all subregion result to output of the gamma node
Definition at line 415 of file MlirToJlmConverter.cpp.
◆ ConvertRegion()
Converts the MLIR region and all operations in it MLIR uses blocks as the innermost "container" so this function gets the block of the region and converts it.
- Parameters
-
| region | The MLIR region to the converted |
| rvsdgRegion | The corresponding RVSDG region that will be populated with all the contents of the MLIR region. |
- Returns
- The results of the region are returned as a std::vector
Definition at line 75 of file MlirToJlmConverter.cpp.
◆ ConvertType()
| std::shared_ptr< const rvsdg::Type > jlm::mlir::MlirToJlmConverter::ConvertType |
( |
const ::mlir::Type & |
type | ) |
|
|
private |
Converts an MLIR type into an RVSDG type.
- Parameters
-
| type | The MLIR type to be converted. |
- Returns
- The converted RVSDG type.
Definition at line 1134 of file MlirToJlmConverter.cpp.
◆ CreateAndConvert()
| static std::unique_ptr<llvm::LlvmRvsdgModule> jlm::mlir::MlirToJlmConverter::CreateAndConvert |
( |
std::unique_ptr<::mlir::Block > & |
block | ) |
|
|
inlinestatic |
Temporarily creates an MlirToJlmConverter that is used to convert an MLIR block to an RVSDG graph.
- Parameters
-
| block | The RVSDG MLIR block to be converted. |
- Returns
- The converted RVSDG graph.
Definition at line 79 of file MlirToJlmConverter.hpp.
◆ GetConvertedInputs()
| llvm::SmallVector< jlm::rvsdg::Output * > jlm::mlir::MlirToJlmConverter::GetConvertedInputs |
( |
::mlir::Operation & |
mlirOp, |
|
|
const std::unordered_map< void *, rvsdg::Output * > & |
outputMap |
|
) |
| |
|
private |
Retreive the previously converted RVSDG ouputs from the map of operations and return them in the inputs vector.
- Parameters
-
| mlirOp | The MLIR operation that the inputs are retrieved for. |
| outputMap | The map of operations that have been converted. argument). |
- Returns
- The vector that is populated with the inputs.
Definition at line 84 of file MlirToJlmConverter.cpp.
◆ GetIndexBitWidth()
| static size_t jlm::mlir::MlirToJlmConverter::GetIndexBitWidth |
( |
| ) |
|
|
inlinestaticprivate |
This function should return an architecture dependent number of bits that is used to represent the MLIR intex type.
- Returns
- The number of bits used to represent the index type (currently hardcoded to 32 bits for x86)
Definition at line 241 of file MlirToJlmConverter.hpp.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ ReadAndConvertMlir()
Reads RVSDG MLIR from a file and converts it,
- Parameters
-
| filePath | The path to the file containing RVSDG MLIR IR. |
- Returns
- The converted RVSDG graph.
Definition at line 28 of file MlirToJlmConverter.cpp.
◆ TryConvertFPCMP()
| llvm::fpcmp jlm::mlir::MlirToJlmConverter::TryConvertFPCMP |
( |
const ::mlir::arith::CmpFPredicate & |
op | ) |
|
|
private |
◆ Context_
| std::unique_ptr<::mlir::MLIRContext> jlm::mlir::MlirToJlmConverter::Context_ |
|
private |
◆ StructTypeMap_
The documentation for this class was generated from the following files: