Skip to content

Commit 8fe04ad

Browse files
committed
[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
1 parent d2da3c2 commit 8fe04ad

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

llvm/lib/Transforms/Utils/LoopSimplify.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -613,11 +613,8 @@ static bool simplifyOneLoop(Loop *L, SmallVectorImpl<Loop *> &Worklist,
613613
// comparison and the branch.
614614
bool AllInvariant = true;
615615
bool AnyInvariant = false;
616-
for (BasicBlock::iterator I = ExitingBlock->begin(); &*I != BI; ) {
616+
for (auto I = ExitingBlock->instructionsWithoutDebug().begin(); &*I != BI; ) {
617617
Instruction *Inst = &*I++;
618-
// Skip debug info intrinsics.
619-
if (isa<DbgInfoIntrinsic>(Inst))
620-
continue;
621618
if (Inst == CI)
622619
continue;
623620
if (!L->makeLoopInvariant(Inst, AnyInvariant,

0 commit comments

Comments
 (0)