summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Transforms
diff options
context:
space:
mode:
Diffstat (limited to 'mlir/lib/Transforms')
-rw-r--r--mlir/lib/Transforms/LoopTiling.cpp2
-rw-r--r--mlir/lib/Transforms/LowerAffine.cpp2
-rw-r--r--mlir/lib/Transforms/MaterializeVectors.cpp2
-rw-r--r--mlir/lib/Transforms/Utils/LoopFusionUtils.cpp6
-rw-r--r--mlir/lib/Transforms/Utils/LoopUtils.cpp5
5 files changed, 7 insertions, 10 deletions
diff --git a/mlir/lib/Transforms/LoopTiling.cpp b/mlir/lib/Transforms/LoopTiling.cpp
index d90e727b0ac..af1ecd06ee6 100644
--- a/mlir/lib/Transforms/LoopTiling.cpp
+++ b/mlir/lib/Transforms/LoopTiling.cpp
@@ -190,7 +190,7 @@ LogicalResult mlir::tileCodeGen(MutableArrayRef<AffineForOp> band,
// Check if the supplied for op's are all successively nested.
for (unsigned i = 1, e = band.size(); i < e; i++) {
- assert(band[i].getOperation()->getParentOp() == band[i - 1].getOperation());
+ assert(band[i].getParentOp() == band[i - 1].getOperation());
}
auto origLoops = band;
diff --git a/mlir/lib/Transforms/LowerAffine.cpp b/mlir/lib/Transforms/LowerAffine.cpp
index 045cf04274c..72d52b9a4f5 100644
--- a/mlir/lib/Transforms/LowerAffine.cpp
+++ b/mlir/lib/Transforms/LowerAffine.cpp
@@ -335,7 +335,7 @@ public:
// Now we just have to handle the condition logic.
auto integerSet = op.getIntegerSet();
Value *zeroConstant = rewriter.create<ConstantIndexOp>(loc, 0);
- SmallVector<Value *, 8> operands(op.getOperation()->getOperands());
+ SmallVector<Value *, 8> operands(op.getOperands());
auto operandsRef = llvm::makeArrayRef(operands);
// Calculate cond as a conjunction without short-circuiting.
diff --git a/mlir/lib/Transforms/MaterializeVectors.cpp b/mlir/lib/Transforms/MaterializeVectors.cpp
index 08bd6644111..a0b60dd3648 100644
--- a/mlir/lib/Transforms/MaterializeVectors.cpp
+++ b/mlir/lib/Transforms/MaterializeVectors.cpp
@@ -721,7 +721,7 @@ static bool materialize(FuncOp f, const SetVector<Operation *> &terminators,
if (fail) {
return true;
}
- LLVM_DEBUG(dbgs() << "\nMLFunction is now\n");
+ LLVM_DEBUG(dbgs() << "\nFunction is now\n");
LLVM_DEBUG(f.print(dbgs()));
}
return false;
diff --git a/mlir/lib/Transforms/Utils/LoopFusionUtils.cpp b/mlir/lib/Transforms/Utils/LoopFusionUtils.cpp
index 8f96cc23fb9..7b2c323b806 100644
--- a/mlir/lib/Transforms/Utils/LoopFusionUtils.cpp
+++ b/mlir/lib/Transforms/Utils/LoopFusionUtils.cpp
@@ -187,7 +187,7 @@ static bool
gatherLoadsAndStores(AffineForOp forOp,
SmallVectorImpl<Operation *> &loadAndStoreOps) {
bool hasIfOp = false;
- forOp.getOperation()->walk([&](Operation *op) {
+ forOp.walk([&](Operation *op) {
if (isa<AffineLoadOp>(op) || isa<AffineStoreOp>(op))
loadAndStoreOps.push_back(op);
else if (isa<AffineIfOp>(op))
@@ -261,7 +261,7 @@ FusionResult mlir::canFuseLoops(AffineForOp srcForOp, AffineForOp dstForOp,
bool mlir::getLoopNestStats(AffineForOp forOpRoot, LoopNestStats *stats) {
auto walkResult = forOpRoot.walk([&](AffineForOp forOp) {
auto *childForOp = forOp.getOperation();
- auto *parentForOp = forOp.getOperation()->getParentOp();
+ auto *parentForOp = forOp.getParentOp();
if (!llvm::isa<FuncOp>(parentForOp)) {
if (!isa<AffineForOp>(parentForOp)) {
LLVM_DEBUG(llvm::dbgs() << "Expected parent AffineForOp");
@@ -444,7 +444,7 @@ bool mlir::getFusionComputeCost(AffineForOp srcForOp, LoopNestStats &srcStats,
// forwarding to remove.
unsigned storeCount = 0;
llvm::SmallDenseSet<Value *, 4> storeMemrefs;
- srcForOp.getOperation()->walk([&](Operation *op) {
+ srcForOp.walk([&](Operation *op) {
if (auto storeOp = dyn_cast<AffineStoreOp>(op)) {
storeMemrefs.insert(storeOp.getMemRef());
++storeCount;
diff --git a/mlir/lib/Transforms/Utils/LoopUtils.cpp b/mlir/lib/Transforms/Utils/LoopUtils.cpp
index f7dd02ff877..1872044b0fb 100644
--- a/mlir/lib/Transforms/Utils/LoopUtils.cpp
+++ b/mlir/lib/Transforms/Utils/LoopUtils.cpp
@@ -367,10 +367,7 @@ void getPerfectlyNestedLoopsImpl(
unsigned maxLoops = std::numeric_limits<unsigned>::max()) {
for (unsigned i = 0; i < maxLoops; ++i) {
forOps.push_back(rootForOp);
- // FIXME: ForOp and AffineForOp currently provide different names to access
- // the region ("region" and "getRegion"). Remove this generic access when
- // AffineForOp moves to ODS and also gets "region".
- Block &body = rootForOp.getOperation()->getRegion(0).front();
+ Block &body = rootForOp.region().front();
if (body.begin() != std::prev(body.end(), 2))
return;
OpenPOWER on IntegriCloud