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

Tobias Gysi llvmlistbot at llvm.org
Tue Nov 12 04:05:30 PST 2024


================
@@ -689,6 +689,15 @@ void ModuleImport::setExactFlag(llvm::Instruction *inst, Operation *op) const {
   iface.setIsExact(inst->isExact());
 }
 
+void ModuleImport::setDisjointFlag(llvm::Instruction *inst,
+                                   Operation *op) const {
+  auto iface = cast<DisjointFlagInterface>(op);
+
+  auto inst_disjoint = cast<llvm::PossiblyDisjointInst>(inst);
+
+  iface.setIsDisjoint(inst_disjoint->isDisjoint());
----------------
gysit wrote:

```suggestion
  auto iface = cast<DisjointFlagInterface>(op);
  auto inst_disjoint = cast<llvm::PossiblyDisjointInst>(inst);
  
  iface.setIsDisjoint(inst_disjoint->isDisjoint());
```
nit: I think it is fine to drop the newlines here. At the very least the one between the two cast instructions.

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


More information about the Mlir-commits mailing list