SmallVector<Instruction *, 4> SpeculatedDbgIntrinsics;
- unsigned SpeculationCost = 0;
+ unsigned SpeculatedInstructions = 0;
Value *SpeculatedStoreValue = nullptr;
StoreInst *SpeculatedStore = nullptr;
for (BasicBlock::iterator BBI = ThenBB->begin(),
// Only speculatively execute a single instruction (not counting the
// terminator) for now.
- ++SpeculationCost;
- if (SpeculationCost > 1)
+ ++SpeculatedInstructions;
+ if (SpeculatedInstructions > 1)
return false;
// Don't hoist the instruction if it's unsafe or expensive.
E = SinkCandidateUseCounts.end();
I != E; ++I)
if (I->first->hasNUses(I->second)) {
- ++SpeculationCost;
- if (SpeculationCost > 1)
+ ++SpeculatedInstructions;
+ if (SpeculatedInstructions > 1)
return false;
}
// getting expanded into Instructions.
// FIXME: This doesn't account for how many operations are combined in the
// constant expression.
- ++SpeculationCost;
- if (SpeculationCost > 1)
+ ++SpeculatedInstructions;
+ if (SpeculatedInstructions > 1)
return false;
}