[Mlir-commits] [mlir] Enable LICM for ops with only read side effects in scf.for (PR #120302)
Arda Unal
llvmlistbot at llvm.org
Thu Dec 19 15:00:50 PST 2024
================
@@ -395,6 +395,83 @@ std::optional<SmallVector<OpFoldResult>> ForOp::getLoopUpperBounds() {
std::optional<ResultRange> ForOp::getLoopResults() { return getResults(); }
+FailureOr<std::pair<Operation *, Region *>> ForOp::wrapInTripCountCheck() {
+ auto lowerBound = this->getLowerBound();
+ auto upperBound = this->getUpperBound();
+ auto step = this->getStep();
+ auto initArgs = this->getInitArgs();
+ auto results = this->getResults();
+ auto loc = this->getLoc();
----------------
ardaunal wrote:
Updated.
https://github.com/llvm/llvm-project/pull/120302
More information about the Mlir-commits
mailing list