[Mlir-commits] [mlir] Reimplementing target description concept using DLTI attribute (PR #92138)
Mehdi Amini
llvmlistbot at llvm.org
Mon Jun 17 06:07:03 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>();
+ }
----------------
joker-eph wrote:
```suggestion
ModuleOp moduleOp = dyn_cast<ModuleOp>(operation);
if (!moduleOp)
moduleOp = operation->getParentOfType<ModuleOp>();
```
https://github.com/llvm/llvm-project/pull/92138
More information about the Mlir-commits
mailing list