[Mlir-commits] [mlir] [mlir][Linalg] Add speculation for LinalgStructuredOps (PR #108032)
Jakub Kuderski
llvmlistbot at llvm.org
Tue Sep 10 07:51:25 PDT 2024
================
@@ -1202,6 +1203,20 @@ void GenericOp::getEffects(
getGenericEffectsImpl(effects, cast<LinalgOp>(getOperation()));
}
+static Speculation::Speculatability
+getGenericSpeculatabilityImpl(LinalgOp linalgOp) {
+ // Operands with value semantics are speculatable, while operands with memory
+ // semantics are not.
+ if (!linalgOp.hasPureTensorSemantics())
+ return Speculation::NotSpeculatable;
+ // The body of the op can still have speculation in it's region.
----------------
kuhar wrote:
```suggestion
// The body of the op can still have speculation in its region.
```
https://github.com/llvm/llvm-project/pull/108032
More information about the Mlir-commits
mailing list