[PATCH] D46254: [LV] Use BB::instructionsWithoutDebug to skip DbgInfo (NFC).
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 30 06:31:40 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL331174: [LV] Use BB::instructionsWithoutDebug to skip DbgInfo (NFC). (authored by fhahn, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D46254?vs=144519&id=144548#toc
Repository:
rL LLVM
https://reviews.llvm.org/D46254
Files:
llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
Index: llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
===================================================================
--- llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ llvm/trunk/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -5552,11 +5552,7 @@
VectorizationCostTy BlockCost;
// For each instruction in the old loop.
- for (Instruction &I : *BB) {
- // Skip dbg intrinsics.
- if (isa<DbgInfoIntrinsic>(I))
- continue;
-
+ for (Instruction &I : BB->instructionsWithoutDebug()) {
// Skip ignored values.
if (ValuesToIgnore.count(&I) ||
(VF > 1 && VecValuesToIgnore.count(&I)))
@@ -6864,13 +6860,12 @@
// Organize the ingredients to vectorize from current basic block in the
// right order.
- for (Instruction &I : *BB) {
+ for (Instruction &I : BB->instructionsWithoutDebug()) {
Instruction *Instr = &I;
// First filter out irrelevant instructions, to ensure no recipes are
// built for them.
- if (isa<BranchInst>(Instr) || isa<DbgInfoIntrinsic>(Instr) ||
- DeadInstructions.count(Instr))
+ if (isa<BranchInst>(Instr) || DeadInstructions.count(Instr))
continue;
// I is a member of an InterleaveGroup for Range.Start. If it's an adjunct
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D46254.144548.patch
Type: text/x-patch
Size: 1297 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180430/bf64d225/attachment.bin>
More information about the llvm-commits
mailing list