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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@331217
91177308-0d34-0410-b5e6-
96231b3b80d8
// 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,