summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/LoopSimplify.cpp
diff options
context:
space:
mode:
authorFlorian Hahn <florian.hahn@arm.com>2018-04-30 19:19:36 +0000
committerFlorian Hahn <florian.hahn@arm.com>2018-04-30 19:19:36 +0000
commit8fe04ad3f7acf9eac603602cfc2980b7ad85d7a1 (patch)
tree98b6c2346ff53e0465c194af12988cda0057115a /llvm/lib/Transforms/Utils/LoopSimplify.cpp
parentd2da3c20d78f11700131c6022c8d8dca2423123f (diff)
downloadbcm5719-llvm-8fe04ad3f7acf9eac603602cfc2980b7ad85d7a1.tar.gz
bcm5719-llvm-8fe04ad3f7acf9eac603602cfc2980b7ad85d7a1.zip
[LoopSimplify] Use BB::instructionsWithoutDebug to skip DbgInfo (NFC).
This patch updates some code responsible the skip debug info to use BasicBlock::instructionsWithoutDebug. I think this makes things slightly simpler and more direct. Reviewers: aprantl, vsk, chandlerc Reviewed By: aprantl Differential Revision: https://reviews.llvm.org/D46253 llvm-svn: 331217
Diffstat (limited to 'llvm/lib/Transforms/Utils/LoopSimplify.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/LoopSimplify.cpp5
1 files changed, 1 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Utils/LoopSimplify.cpp b/llvm/lib/Transforms/Utils/LoopSimplify.cpp
index 1ee21411377..bc5d6a9b54e 100644
--- a/llvm/lib/Transforms/Utils/LoopSimplify.cpp
+++ b/llvm/lib/Transforms/Utils/LoopSimplify.cpp
@@ -613,11 +613,8 @@ ReprocessLoop:
// comparison and the branch.
bool AllInvariant = true;
bool AnyInvariant = false;
- for (BasicBlock::iterator I = ExitingBlock->begin(); &*I != BI; ) {
+ for (auto I = ExitingBlock->instructionsWithoutDebug().begin(); &*I != BI; ) {
Instruction *Inst = &*I++;
- // Skip debug info intrinsics.
- if (isa<DbgInfoIntrinsic>(Inst))
- continue;
if (Inst == CI)
continue;
if (!L->makeLoopInvariant(Inst, AnyInvariant,
OpenPOWER on IntegriCloud