diff options
author | Tobias Gysi <tobias.gysi@nextsilicon.com> | 2022-11-18 15:04:38 +0100 |
---|---|---|
committer | Tobias Gysi <tobias.gysi@nextsilicon.com> | 2022-11-18 15:15:35 +0100 |
commit | bc270f9ed1c86db3f3a537dc6f91cda94737b915 (patch) | |
tree | b0653174b7854c87eaed20f3c8348e1df1de7831 /mlir/tools | |
parent | 6527201414cf9479639594a7a1f80558ec09d106 (diff) | |
download | llvm-bc270f9ed1c86db3f3a537dc6f91cda94737b915.zip llvm-bc270f9ed1c86db3f3a537dc6f91cda94737b915.tar.gz llvm-bc270f9ed1c86db3f3a537dc6f91cda94737b915.tar.bz2 |
[mlir][llvm] Iterative constant import from LLVM IR.
Instead of importing constant expressions recursively, the revision
walks all dependencies of an LLVM constant iteratively. The actual
conversion then iterates over a list of constants and all intermediate
constant values are added to the value mapping. As a result, an LLVM IR
constant maps to exactly one MLIR operation per function. The revision
adapts the existing tests since the constant ordering changed for
aggregate types. Additionally, it adds extra tests that mix aggregate
constants and constant expressions.
Depends on D137416
Reviewed By: ftynse
Differential Revision: https://reviews.llvm.org/D137559
Diffstat (limited to 'mlir/tools')
-rw-r--r-- | mlir/tools/mlir-tblgen/LLVMIRConversionGen.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mlir/tools/mlir-tblgen/LLVMIRConversionGen.cpp b/mlir/tools/mlir-tblgen/LLVMIRConversionGen.cpp index 8124569..b070e58 100644 --- a/mlir/tools/mlir-tblgen/LLVMIRConversionGen.cpp +++ b/mlir/tools/mlir-tblgen/LLVMIRConversionGen.cpp @@ -240,8 +240,8 @@ static LogicalResult emitOneMLIRBuilder(const Record &record, raw_ostream &os, bool isVariadicOperand = isVariadicOperandName(op, name); auto result = isVariadicOperand - ? formatv("processValues(llvmOperands.drop_front({0}))", idx) - : formatv("processValue(llvmOperands[{0}])", idx); + ? formatv("convertValues(llvmOperands.drop_front({0}))", idx) + : formatv("convertValue(llvmOperands[{0}])", idx); bs << result; } else if (isResultName(op, name)) { if (op.getNumResults() != 1) |