diff options
author | Florian Hahn <florian.hahn@arm.com> | 2018-04-30 13:28:08 +0000 |
---|---|---|
committer | Florian Hahn <florian.hahn@arm.com> | 2018-04-30 13:28:08 +0000 |
commit | deb01ea126fd1ab989264ccb43018969b0cda5d3 (patch) | |
tree | 2f5aaeec0287abf368494c89a1dfbff6daa2cdd3 | |
parent | edb012762914c36314aa96a4635570340131bda8 (diff) | |
download | bcm5719-llvm-deb01ea126fd1ab989264ccb43018969b0cda5d3.tar.gz bcm5719-llvm-deb01ea126fd1ab989264ccb43018969b0cda5d3.zip |
[LV] 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: mkuper, rengolin, dcaballe, aprantl, vsk
Reviewed By: rengolin
Differential Revision: https://reviews.llvm.org/D46254
llvm-svn: 331174
-rw-r--r-- | llvm/lib/Transforms/Vectorize/LoopVectorize.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp index 4c4f9523a29..8778a2d5f2d 100644 --- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp +++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp @@ -5552,11 +5552,7 @@ LoopVectorizationCostModel::expectedCost(unsigned VF) { 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 @@ LoopVectorizationPlanner::buildVPlan(VFRange &Range, // 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 |