[PATCH] D46253: [LoopSimplify] Use BB::instructionsWithoutDebug to skip DbgInfo (NFC).
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 30 12:24:50 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL331217: [LoopSimplify] Use BB::instructionsWithoutDebug to skip DbgInfo (NFC). (authored by fhahn, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D46253?vs=144518&id=144612#toc
Repository:
rL LLVM
https://reviews.llvm.org/D46253
Files:
llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp
Index: llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp
===================================================================
--- llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp
+++ llvm/trunk/lib/Transforms/Utils/LoopSimplify.cpp
@@ -613,11 +613,8 @@
// 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,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46253.144612.patch
Type: text/x-patch
Size: 756 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180430/3e4a85ba/attachment.bin>
More information about the llvm-commits
mailing list