1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00

[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
This commit is contained in:
Florian Hahn 2018-04-30 13:28:08 +00:00
parent 80c3f40425
commit 234db2eb55

View File

@ -5552,11 +5552,7 @@ LoopVectorizationCostModel::expectedCost(unsigned VF) {
VectorizationCostTy BlockCost; VectorizationCostTy BlockCost;
// For each instruction in the old loop. // For each instruction in the old loop.
for (Instruction &I : *BB) { for (Instruction &I : BB->instructionsWithoutDebug()) {
// Skip dbg intrinsics.
if (isa<DbgInfoIntrinsic>(I))
continue;
// Skip ignored values. // Skip ignored values.
if (ValuesToIgnore.count(&I) || if (ValuesToIgnore.count(&I) ||
(VF > 1 && VecValuesToIgnore.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 // Organize the ingredients to vectorize from current basic block in the
// right order. // right order.
for (Instruction &I : *BB) { for (Instruction &I : BB->instructionsWithoutDebug()) {
Instruction *Instr = &I; Instruction *Instr = &I;
// First filter out irrelevant instructions, to ensure no recipes are // First filter out irrelevant instructions, to ensure no recipes are
// built for them. // built for them.
if (isa<BranchInst>(Instr) || isa<DbgInfoIntrinsic>(Instr) || if (isa<BranchInst>(Instr) || DeadInstructions.count(Instr))
DeadInstructions.count(Instr))
continue; continue;
// I is a member of an InterleaveGroup for Range.Start. If it's an adjunct // I is a member of an InterleaveGroup for Range.Start. If it's an adjunct