mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-07 12:28:24 +00:00
Minor code simplification.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91653 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -212,8 +212,6 @@ Pass *llvm::createLoopStrengthReducePass(const TargetLowering *TLI) {
|
|||||||
/// specified set are trivially dead, delete them and see if this makes any of
|
/// specified set are trivially dead, delete them and see if this makes any of
|
||||||
/// their operands subsequently dead.
|
/// their operands subsequently dead.
|
||||||
void LoopStrengthReduce::DeleteTriviallyDeadInstructions() {
|
void LoopStrengthReduce::DeleteTriviallyDeadInstructions() {
|
||||||
if (DeadInsts.empty()) return;
|
|
||||||
|
|
||||||
while (!DeadInsts.empty()) {
|
while (!DeadInsts.empty()) {
|
||||||
Instruction *I = dyn_cast_or_null<Instruction>(DeadInsts.pop_back_val());
|
Instruction *I = dyn_cast_or_null<Instruction>(DeadInsts.pop_back_val());
|
||||||
|
|
||||||
@@ -2720,8 +2718,7 @@ bool LoopStrengthReduce::runOnLoop(Loop *L, LPPassManager &LPM) {
|
|||||||
IVsByStride.clear();
|
IVsByStride.clear();
|
||||||
|
|
||||||
// Clean up after ourselves
|
// Clean up after ourselves
|
||||||
if (!DeadInsts.empty())
|
DeleteTriviallyDeadInstructions();
|
||||||
DeleteTriviallyDeadInstructions();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// At this point, it is worth checking to see if any recurrence PHIs are also
|
// At this point, it is worth checking to see if any recurrence PHIs are also
|
||||||
|
Reference in New Issue
Block a user