mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-21 08:17:40 +00:00
Modified depends() to recognize that when all levels are "=" and
there's no possible loo-independent dependence, then there's no dependence. Updated all test result appropriately. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@168719 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -3563,8 +3563,10 @@ Dependence *DependenceAnalysis::depends(Instruction *Src,
|
||||
if (CompleteLoops[II])
|
||||
Result.DV[II - 1].Scalar = false;
|
||||
|
||||
// make sure loopIndepent flag is set correctly
|
||||
if (PossiblyLoopIndependent) {
|
||||
// Make sure the LoopIndependent flag is set correctly.
|
||||
// All directions must include equal, otherwise no
|
||||
// loop-independent dependence is possible.
|
||||
for (unsigned II = 1; II <= CommonLevels; ++II) {
|
||||
if (!(Result.getDirection(II) & Dependence::DVEntry::EQ)) {
|
||||
Result.LoopIndependent = false;
|
||||
@@ -3572,6 +3574,19 @@ Dependence *DependenceAnalysis::depends(Instruction *Src,
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
// On the other hand, if all directions are equal and there's no
|
||||
// loop-independent dependence possible, then no dependence exists.
|
||||
bool AllEqual = true;
|
||||
for (unsigned II = 1; II <= CommonLevels; ++II) {
|
||||
if (Result.getDirection(II) != Dependence::DVEntry::EQ) {
|
||||
AllEqual = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (AllEqual)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
FullDependence *Final = new FullDependence(Result);
|
||||
Result.DV = NULL;
|
||||
|
||||
Reference in New Issue
Block a user