mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-25 00:24:26 +00:00
Rename Reduction variables/structures to Recurrence.
A reduction is a special kind of recurrence. In the loop vectorizer we currently identify basic reductions. Future patches will extend this to identifying basic recurrences. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239835 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -598,8 +598,8 @@ struct LoopInterchange : public FunctionPass {
|
||||
bool LoopInterchangeLegality::areAllUsesReductions(Instruction *Ins, Loop *L) {
|
||||
return !std::any_of(Ins->user_begin(), Ins->user_end(), [=](User *U) -> bool {
|
||||
PHINode *UserIns = dyn_cast<PHINode>(U);
|
||||
ReductionDescriptor RD;
|
||||
return !UserIns || !ReductionDescriptor::isReductionPHI(UserIns, L, RD);
|
||||
RecurrenceDescriptor RD;
|
||||
return !UserIns || !RecurrenceDescriptor::isReductionPHI(UserIns, L, RD);
|
||||
});
|
||||
}
|
||||
|
||||
@ -697,12 +697,12 @@ bool LoopInterchangeLegality::findInductionAndReductions(
|
||||
if (!L->getLoopLatch() || !L->getLoopPredecessor())
|
||||
return false;
|
||||
for (BasicBlock::iterator I = L->getHeader()->begin(); isa<PHINode>(I); ++I) {
|
||||
ReductionDescriptor RD;
|
||||
RecurrenceDescriptor RD;
|
||||
PHINode *PHI = cast<PHINode>(I);
|
||||
ConstantInt *StepValue = nullptr;
|
||||
if (isInductionPHI(PHI, SE, StepValue))
|
||||
Inductions.push_back(PHI);
|
||||
else if (ReductionDescriptor::isReductionPHI(PHI, L, RD))
|
||||
else if (RecurrenceDescriptor::isReductionPHI(PHI, L, RD))
|
||||
Reductions.push_back(PHI);
|
||||
else {
|
||||
DEBUG(
|
||||
|
Reference in New Issue
Block a user