[Mlir-commits] [mlir] Reimplementing target description concept using DLTI attribute (PR #92138)
Mehdi Amini
llvmlistbot at llvm.org
Mon Jun 17 06:07:45 PDT 2024
================
@@ -324,6 +346,19 @@ static DataLayoutSpecInterface getSpec(Operation *operation) {
});
}
+static TargetSystemSpecInterface getTargetSystemSpec(Operation *operation) {
+ if (operation) {
+ ModuleOp moduleOp;
+ if (isa<ModuleOp>(operation)) {
+ moduleOp = llvm::dyn_cast<ModuleOp>(operation);
+ } else {
+ moduleOp = operation->getParentOfType<ModuleOp>();
+ }
+ return moduleOp.getTargetSystemSpec();
+ } else
----------------
joker-eph wrote:
No else after return
```suggestion
}
```
https://github.com/llvm/llvm-project/pull/92138
More information about the Mlir-commits
mailing list