|
Jlm
|
#include <JlmToMlirConverter.hpp>
Public Member Functions | |
| JlmToMlirConverter () | |
| JlmToMlirConverter (const JlmToMlirConverter &)=delete | |
| JlmToMlirConverter (JlmToMlirConverter &&)=delete | |
| JlmToMlirConverter & | operator= (const JlmToMlirConverter &)=delete |
| JlmToMlirConverter & | operator= (JlmToMlirConverter &&)=delete |
| ::mlir::rvsdg::OmegaNode | ConvertModule (const llvm::LlvmRvsdgModule &rvsdgModule) |
| ::llvm::SmallVector<::mlir::Value > | ConvertRegion (rvsdg::Region ®ion, ::mlir::Block &block, bool isRoot=false) |
| static ::llvm::SmallVector<::mlir::Value > | GetConvertedInputs (const rvsdg::Node &node, const std::unordered_map< rvsdg::Output *, ::mlir::Value > &valueMap) |
| ::mlir::Operation * | ConvertNode (const rvsdg::Node &node, ::mlir::Block &block, const ::llvm::SmallVector<::mlir::Value > &inputs) |
| ::mlir::Operation * | ConvertFpBinaryNode (const jlm::llvm::FBinaryOperation &op, ::llvm::SmallVector<::mlir::Value > inputs) |
| ::mlir::Operation * | ConvertFpCompareNode (const jlm::llvm::FCmpOperation &op, ::llvm::SmallVector<::mlir::Value > inputs) |
| ::mlir::Operation * | ConvertBitBinaryNode (const rvsdg::SimpleOperation &bitOp, ::llvm::SmallVector<::mlir::Value > inputs) |
| ::mlir::Operation * | ConvertIntegerBinaryOperation (const jlm::llvm::IntegerBinaryOperation &operation, ::llvm::SmallVector<::mlir::Value > inputs) |
| ::mlir::Operation * | BitCompareNode (const rvsdg::SimpleOperation &bitOp, ::llvm::SmallVector<::mlir::Value > inputs) |
| ::mlir::Operation * | ConvertPointerCompareNode (const llvm::PtrCmpOperation &pointerCompareOp, ::llvm::SmallVector<::mlir::Value > inputs) |
| ::mlir::Operation * | ConvertSimpleNode (const rvsdg::SimpleNode &node, ::mlir::Block &block, const ::llvm::SmallVector<::mlir::Value > &inputs) |
| ::mlir::Operation * | ConvertLambda (const rvsdg::LambdaNode &node, ::mlir::Block &block, const ::llvm::SmallVector<::mlir::Value > &inputs) |
| ::mlir::Operation * | ConvertGamma (const rvsdg::GammaNode &gammaNode, ::mlir::Block &block, const ::llvm::SmallVector<::mlir::Value > &inputs) |
| ::mlir::Operation * | ConvertTheta (const rvsdg::ThetaNode &thetaNode, ::mlir::Block &block, const ::llvm::SmallVector<::mlir::Value > &inputs) |
| ::mlir::Operation * | ConvertDelta (const rvsdg::DeltaNode &node, ::mlir::Block &block, const ::llvm::SmallVector<::mlir::Value > &inputs) |
| ::mlir::FloatType | ConvertFPType (const llvm::fpsize size) |
| ::mlir::FunctionType | ConvertFunctionType (const jlm::rvsdg::FunctionType &functionType) |
| ::mlir::Type | ConvertType (const rvsdg::Type &type) |
| ::llvm::SmallVector<::mlir::Type > | GetMemStateRange (size_t nresults) |
Static Public Member Functions | |
| static void | Print (::mlir::rvsdg::OmegaNode &omega, const util::FilePath &filePath) |
Public Attributes | |
| std::unique_ptr<::mlir::OpBuilder > | Builder_ |
| std::unique_ptr<::mlir::MLIRContext > | Context_ |
Definition at line 34 of file JlmToMlirConverter.hpp.
|
inline |
Definition at line 37 of file JlmToMlirConverter.hpp.
|
delete |
|
delete |
| mlir::Operation * jlm::mlir::JlmToMlirConverter::BitCompareNode | ( | const rvsdg::SimpleOperation & | bitOp, |
| ::llvm::SmallVector<::mlir::Value > | inputs | ||
| ) |
Converts an RVSDG BitCompareOperation to an MLIR RVSDG operation.
| bitOp | The RVSDG BitCompareOperation to be converted |
| inputs | The inputs to the BitCompareOperation. |
Definition at line 328 of file JlmToMlirConverter.cpp.
| mlir::Operation * jlm::mlir::JlmToMlirConverter::ConvertBitBinaryNode | ( | const rvsdg::SimpleOperation & | bitOp, |
| ::llvm::SmallVector<::mlir::Value > | inputs | ||
| ) |
Converts an RVSDG binary_op to an MLIR RVSDG operation.
| bitOp | The RVSDG BitBinaryOperation to be converted |
| inputs | The inputs to the BitBinaryOperation. |
Definition at line 241 of file JlmToMlirConverter.cpp.
| mlir::Operation * jlm::mlir::JlmToMlirConverter::ConvertDelta | ( | const rvsdg::DeltaNode & | node, |
| ::mlir::Block & | block, | ||
| const ::llvm::SmallVector<::mlir::Value > & | inputs | ||
| ) |
Converts an RVSDG delta node to an MLIR RVSDG DeltaNode.
| node | The RVSDG delta node to be converted |
| block | The MLIR RVSDG block to insert the delta node. |
| inputs | The inputs to the DeltaNode. |
Definition at line 941 of file JlmToMlirConverter.cpp.
| mlir::Operation * jlm::mlir::JlmToMlirConverter::ConvertFpBinaryNode | ( | const jlm::llvm::FBinaryOperation & | op, |
| ::llvm::SmallVector<::mlir::Value > | inputs | ||
| ) |
Converts a floating point binary operation to an MLIR operation.
| op | The jlm::llvm::FBinaryOperation to be converted |
| inputs | The inputs to the jlm::llvm::FBinaryOperation. |
Definition at line 205 of file JlmToMlirConverter.cpp.
| mlir::Operation * jlm::mlir::JlmToMlirConverter::ConvertFpCompareNode | ( | const jlm::llvm::FCmpOperation & | op, |
| ::llvm::SmallVector<::mlir::Value > | inputs | ||
| ) |
Converts an FCmpOperation to an MLIR operation.
| op | The FCmpOperation to be converted. |
| inputs | The inputs to the FCmpOperation. |
Definition at line 227 of file JlmToMlirConverter.cpp.
| mlir::FloatType jlm::mlir::JlmToMlirConverter::ConvertFPType | ( | const llvm::fpsize | size | ) |
Converts an RVSDG floating point size to an MLIR floating point type.
| size | The jlm::llvm::fpsize to be converted. |
Definition at line 966 of file JlmToMlirConverter.cpp.
| mlir::FunctionType jlm::mlir::JlmToMlirConverter::ConvertFunctionType | ( | const jlm::rvsdg::FunctionType & | functionType | ) |
Converts an JLM function type to an MLIR LLVM function type.
| functionType | The JLM function type to be converted. |
Definition at line 989 of file JlmToMlirConverter.cpp.
| mlir::Operation * jlm::mlir::JlmToMlirConverter::ConvertGamma | ( | const rvsdg::GammaNode & | gammaNode, |
| ::mlir::Block & | block, | ||
| const ::llvm::SmallVector<::mlir::Value > & | inputs | ||
| ) |
Converts an RVSDG gamma node to an MLIR RVSDG GammaNode.
| gammaNode | The RVSDG gamma node to be converted |
| block | The MLIR RVSDG block to insert the gamma node. |
| inputs | The inputs to the gamma node. |
Definition at line 870 of file JlmToMlirConverter.cpp.
| mlir::Operation * jlm::mlir::JlmToMlirConverter::ConvertIntegerBinaryOperation | ( | const jlm::llvm::IntegerBinaryOperation & | operation, |
| ::llvm::SmallVector<::mlir::Value > | inputs | ||
| ) |
Converts an integer binary operation to an MLIR operation.
| operation | The integer binary operation to be converted |
| inputs | The inputs to the operation |
Definition at line 1086 of file JlmToMlirConverter.cpp.
| mlir::Operation * jlm::mlir::JlmToMlirConverter::ConvertLambda | ( | const rvsdg::LambdaNode & | node, |
| ::mlir::Block & | block, | ||
| const ::llvm::SmallVector<::mlir::Value > & | inputs | ||
| ) |
Converts an RVSDG lambda node to an MLIR RVSDG LambdaNode.
| node | The RVSDG lambda node to be converted |
| block | The MLIR RVSDG block to insert the lambda node. |
| inputs | The inputs to the lambda::node. |
Definition at line 835 of file JlmToMlirConverter.cpp.
| mlir::rvsdg::OmegaNode jlm::mlir::JlmToMlirConverter::ConvertModule | ( | const llvm::LlvmRvsdgModule & | rvsdgModule | ) |
Converts an RVSDG module to MLIR RVSDG.
| rvsdgModule | The RVSDG module to be converted. |
Definition at line 57 of file JlmToMlirConverter.cpp.
| mlir::Operation * jlm::mlir::JlmToMlirConverter::ConvertNode | ( | const rvsdg::Node & | node, |
| ::mlir::Block & | block, | ||
| const ::llvm::SmallVector<::mlir::Value > & | inputs | ||
| ) |
Converts an RVSDG node to an MLIR RVSDG operation.
| node | The RVSDG node to be converted |
| block | The MLIR RVSDG block to insert the converted node. |
| inputs | The inputs to the node. |
Definition at line 172 of file JlmToMlirConverter.cpp.
| mlir::Operation * jlm::mlir::JlmToMlirConverter::ConvertPointerCompareNode | ( | const llvm::PtrCmpOperation & | pointerCompareOp, |
| ::llvm::SmallVector<::mlir::Value > | inputs | ||
| ) |
Converts an RVSDG BitCompareOperation to an MLIR RVSDG operation.
| pointerCompareOp | The RVSDG BitCompareOperation to be converted |
| inputs | The inputs to the BitCompareOperation. |
Definition at line 368 of file JlmToMlirConverter.cpp.
| llvm::SmallVector<::mlir::Value > jlm::mlir::JlmToMlirConverter::ConvertRegion | ( | rvsdg::Region & | region, |
| ::mlir::Block & | block, | ||
| bool | isRoot = false |
||
| ) |
Converts all nodes in an RVSDG region. Conversion of structural nodes cause their regions to also be converted.
| region | The RVSDG region to be converted |
| block | The MLIR RVSDG block that corresponds to this RVSDG region, and to which converted nodes are insterted. |
| isRoot | Whether the region is the root of the RVSDG. |
It is similar to the GetConvertedInputs function
Definition at line 74 of file JlmToMlirConverter.cpp.
| mlir::Operation * jlm::mlir::JlmToMlirConverter::ConvertSimpleNode | ( | const rvsdg::SimpleNode & | node, |
| ::mlir::Block & | block, | ||
| const ::llvm::SmallVector<::mlir::Value > & | inputs | ||
| ) |
Converts an RVSDG SimpleNode to an MLIR RVSDG operation.
| node | The RVSDG node to be converted |
| block | The MLIR RVSDG block to insert the converted node. |
| inputs | The inputs to the SimpleNode. |
MLIR match operation can match multiple values to one index But jlm implements this with multiple mappings For easy conversion, we only created one mapping per value
The default alternative has an empty mapping
Definition at line 421 of file JlmToMlirConverter.cpp.
| mlir::Operation * jlm::mlir::JlmToMlirConverter::ConvertTheta | ( | const rvsdg::ThetaNode & | thetaNode, |
| ::mlir::Block & | block, | ||
| const ::llvm::SmallVector<::mlir::Value > & | inputs | ||
| ) |
Definition at line 909 of file JlmToMlirConverter.cpp.
| mlir::Type jlm::mlir::JlmToMlirConverter::ConvertType | ( | const rvsdg::Type & | type | ) |
Converts an RVSDG type to an MLIR RVSDG type.
| type | The RVSDG type to be converted. |
Definition at line 1005 of file JlmToMlirConverter.cpp.
| llvm::SmallVector<::mlir::Value > jlm::mlir::JlmToMlirConverter::GetConvertedInputs | ( | const rvsdg::Node & | node, |
| const std::unordered_map< rvsdg::Output *, ::mlir::Value > & | valueMap | ||
| ) |
Retreive the previously converted MLIR values from the map of operations
| node | The RVSDG node to get the inputs for. |
| valueMap | A map of RVSDG outputs to their corresponding MLIR values. |
Definition at line 142 of file JlmToMlirConverter.cpp.
| llvm::SmallVector<::mlir::Type > jlm::mlir::JlmToMlirConverter::GetMemStateRange | ( | size_t | nresults | ) |
Generate a vector with memory state types.
| nresults | The number of memory state types to generate. |
Definition at line 824 of file JlmToMlirConverter.cpp.
|
delete |
|
delete |
|
static |
Prints MLIR RVSDG to a file.
| omega | The MLIR RVSDG Omega node to be printed. |
| filePath | The path to the file to print the MLIR to. |
Definition at line 36 of file JlmToMlirConverter.cpp.
| std::unique_ptr<::mlir::OpBuilder> jlm::mlir::JlmToMlirConverter::Builder_ |
Definition at line 265 of file JlmToMlirConverter.hpp.
| std::unique_ptr<::mlir::MLIRContext> jlm::mlir::JlmToMlirConverter::Context_ |
Definition at line 266 of file JlmToMlirConverter.hpp.