[Mlir-commits] [mlir] [mlir][LLVM] Add disjoint flag (PR #115855)

Tobias Gysi llvmlistbot at llvm.org
Tue Nov 12 06:35:07 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);
----------------
gysit wrote:

Can you rename inst_disjoint in the other function as well? Sorry I forgot to mark that as well. Feel free to fix this things proactively.

Regarding the llvm::Value. I think you could use llvm::Instruction and it would cast to a llvm::Value right? That maybe preferable over using a value since it is in line with all the other helper functions we have. If it doesn't work the comment on the function needs to be fixed by replacing inst -> value.

Sorry for being a bit pedantic :).

https://github.com/llvm/llvm-project/pull/115855


More information about the Mlir-commits mailing list