[Mlir-commits] [mlir] [mlir][LLVM] Add disjoint flag (PR #115855)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Tue Nov 12 07:11:41 PST 2024
=?utf-8?q?Léon?= Frenot <leon.frenot at ens-lyon.fr>,
=?utf-8?q?Léon?= Frenot <leon.frenot at ens-lyon.fr>
Message-ID:
In-Reply-To: <llvm.org/llvm/llvm-project/pull/115855 at github.com>
================
@@ -1898,6 +1898,13 @@ void ModuleTranslation::setLoopMetadata(Operation *op,
inst->setMetadata(llvm::LLVMContext::MD_loop, loopMD);
}
+void ModuleTranslation::setDisjointFlag(Operation *op, llvm::Value *inst) {
+ auto iface = cast<DisjointFlagInterface>(op);
+ auto inst_disjoint = cast<llvm::PossiblyDisjointInst>(inst);
----------------
lfrenot wrote:
Sorry, I forgot about the other function.
As for the Value issue, I may have been unclear, but the issue I get if I use Instruction is from the llvm builder
```
/home/leon_frenot/fork-llvm/build/tools/mlir/include/mlir/Dialect/LLVMIR/LLVMConversions.inc:279:43: error: invalid conversion from ‘llvm::Value*’ to ‘llvm::Instruction*’ [-fpermissive]
279 | moduleTranslation.setDisjointFlag(op, inst);
| ^~~~
| |
| llvm::Value*
```
So the issue comes from builder.CreateOr returning a Value instead of an Instruction.
For now I'll simply fix the comment
https://github.com/llvm/llvm-project/pull/115855
More information about the Mlir-commits
mailing list