summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Transforms
diff options
context:
space:
mode:
authorAmit Sabne <asabne@google.com>2019-04-17 13:39:41 -0700
committerMehdi Amini <joker.eph@gmail.com>2019-04-18 11:49:39 -0700
commit4aa9235ae0ea4e4b0502640b65b298272908f66b (patch)
tree05558067a0d279d2a1a328b88f9491d90a0d132e /mlir/lib/Transforms
parent7905da656ed69743f38ecc34bdbfc996786677c6 (diff)
downloadbcm5719-llvm-4aa9235ae0ea4e4b0502640b65b298272908f66b.tar.gz
bcm5719-llvm-4aa9235ae0ea4e4b0502640b65b298272908f66b.zip
Fix LLVM_DEBUG instances
-- PiperOrigin-RevId: 244058051
Diffstat (limited to 'mlir/lib/Transforms')
-rw-r--r--mlir/lib/Transforms/LoopInvariantCodeMotion.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp b/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
index b1bee484709..13e9cda2407 100644
--- a/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
+++ b/mlir/lib/Transforms/LoopInvariantCodeMotion.cpp
@@ -79,9 +79,10 @@ void LoopInvariantCodeMotion::runOnAffineForOp(AffineForOp forOp) {
// definition closure following the loop induction variable.
getForwardSlice(forOp, &loopDefinedOps);
- for (auto i : loopDefinedOps) {
- LLVM_DEBUG(i->print(llvm::dbgs() << "\nLoop-dependent op\n"));
- }
+ LLVM_DEBUG(for (auto i
+ : loopDefinedOps) {
+ (i->print(llvm::dbgs() << "\nLoop-dependent op\n"));
+ });
for (auto &op : *loopBody) {
// If the operation is loop invariant, insert it into opsToMove.
@@ -118,10 +119,9 @@ void LoopInvariantCodeMotion::runOnFunction() {
[&](AffineForOp forOp) { forOps.push_back(forOp); });
// We gather loops first, and then go over them later because we don't want to
// mess the iterators up.
- for (auto forOp : forOps) {
- auto *forInst = forOp.getOperation();
- LLVM_DEBUG(forInst->print(llvm::dbgs() << "\nOriginal loop\n"));
- runOnAffineForOp(forOp);
+ for (auto op : forOps) {
+ LLVM_DEBUG(op.getOperation()->print(llvm::dbgs() << "\nOriginal loop\n"));
+ runOnAffineForOp(op);
}
}
OpenPOWER on IntegriCloud