Skip to content

Commit 8c6d346

Browse files
committed
remove DVEntry::Splitable and Dependnece::isSplitable
1 parent 947f6d4 commit 8c6d346

File tree

6 files changed

+7
-44
lines changed

6 files changed

+7
-44
lines changed

llvm/include/llvm/Analysis/DependenceAnalysis.h

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,9 @@ class LLVM_ABI Dependence {
107107
bool Scalar : 1; // Init to true.
108108
bool PeelFirst : 1; // Peeling the first iteration will break dependence.
109109
bool PeelLast : 1; // Peeling the last iteration will break the dependence.
110-
bool Splitable : 1; // Splitting the loop will break dependence.
111110
const SCEV *Distance = nullptr; // NULL implies no distance available.
112111
DVEntry()
113-
: Direction(ALL), Scalar(true), PeelFirst(false), PeelLast(false),
114-
Splitable(false) {}
112+
: Direction(ALL), Scalar(true), PeelFirst(false), PeelLast(false) {}
115113
};
116114

117115
/// getSrc - Returns the source instruction for this dependence.
@@ -196,12 +194,6 @@ class LLVM_ABI Dependence {
196194
return false;
197195
}
198196

199-
/// isSplitable - Returns true if splitting the loop will break
200-
/// the dependence.
201-
virtual bool isSplitable(unsigned Level, bool SameSD = false) const {
202-
return false;
203-
}
204-
205197
/// inSameSDLoops - Returns true if this level is an SameSD level, i.e.,
206198
/// performed across two separate loop nests that have the Same Iteration and
207199
/// Depth.
@@ -320,10 +312,6 @@ class LLVM_ABI FullDependence final : public Dependence {
320312
/// this regular or SameSD loop level will break this dependence.
321313
bool isPeelLast(unsigned Level, bool SameSD = false) const override;
322314

323-
/// isSplitable - Returns true if splitting the loop will break
324-
/// the dependence.
325-
bool isSplitable(unsigned Level, bool SameSD = false) const override;
326-
327315
/// inSameSDLoops - Returns true if this level is an SameSD level, i.e.,
328316
/// performed across two separate loop nests that have the Same Iteration and
329317
/// Depth.
@@ -712,7 +700,6 @@ class DependenceInfo {
712700
/// If there might be a dependence, returns false.
713701
/// Sets appropriate direction entry.
714702
/// Set consistent to false.
715-
/// Marks the dependence as splitable.
716703
bool weakCrossingSIVtest(const SCEV *SrcCoeff, const SCEV *SrcConst,
717704
const SCEV *DstConst, const Loop *CurrentSrcLoop,
718705
const Loop *CurrentDstLoop, unsigned Level,

llvm/lib/Analysis/DependenceAnalysis.cpp

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -442,12 +442,6 @@ static void dumpExampleDependence(raw_ostream &OS, DependenceInfo *DA,
442442
if (NormalizeResults && D->normalize(&SE))
443443
OS << "normalized - ";
444444
D->dump(OS);
445-
for (unsigned Level = 1; Level <= D->getLevels(); Level++) {
446-
if (D->isSplitable(Level)) {
447-
OS << " da analyze - split level = " << Level;
448-
OS << "!\n";
449-
}
450-
}
451445
} else
452446
OS << "none!\n";
453447
}
@@ -610,11 +604,6 @@ bool FullDependence::isPeelLast(unsigned Level, bool IsSameSD) const {
610604
return getDVEntry(Level, IsSameSD).PeelLast;
611605
}
612606

613-
// Returns true if splitting loop will break the dependence.
614-
bool FullDependence::isSplitable(unsigned Level, bool IsSameSD) const {
615-
return getDVEntry(Level, IsSameSD).Splitable;
616-
}
617-
618607
// inSameSDLoops - Returns true if this level is an SameSD level, i.e.,
619608
// performed across two separate loop nests that have the Same iteration space
620609
// and Depth.
@@ -1014,7 +1003,6 @@ void Dependence::dump(raw_ostream &OS) const {
10141003
// For debugging purposes. Dumps a dependence to OS with or without considering
10151004
// the SameSD levels.
10161005
void Dependence::dumpImp(raw_ostream &OS, bool IsSameSD) const {
1017-
bool Splitable = false;
10181006
unsigned Levels = getLevels();
10191007
unsigned SameSDLevels = getSameSDLevels();
10201008
bool OnSameSD = false;
@@ -1025,8 +1013,6 @@ void Dependence::dumpImp(raw_ostream &OS, bool IsSameSD) const {
10251013
for (unsigned II = 1; II <= LevelNum; ++II) {
10261014
if (!OnSameSD && inSameSDLoops(II))
10271015
OnSameSD = true;
1028-
if (isSplitable(II, OnSameSD))
1029-
Splitable = true;
10301016
if (isPeelFirst(II, OnSameSD))
10311017
OS << 'p';
10321018
const SCEV *Distance = getDistance(II, OnSameSD);
@@ -1055,8 +1041,6 @@ void Dependence::dumpImp(raw_ostream &OS, bool IsSameSD) const {
10551041
if (isLoopIndependent())
10561042
OS << "|<";
10571043
OS << "]";
1058-
if (Splitable)
1059-
OS << " splitable";
10601044
}
10611045

10621046
// Returns NoAlias/MayAliass/MustAlias for two memory locations based upon their
@@ -1854,7 +1838,6 @@ bool DependenceInfo::weakCrossingSIVtest(
18541838
if (!ConstCoeff)
18551839
return false;
18561840

1857-
Result.DV[Level].Splitable = true;
18581841
if (SE->isKnownNegative(ConstCoeff)) {
18591842
ConstCoeff = dyn_cast<SCEVConstant>(SE->getNegativeSCEV(ConstCoeff));
18601843
assert(ConstCoeff &&
@@ -1902,7 +1885,6 @@ bool DependenceInfo::weakCrossingSIVtest(
19021885
++WeakCrossingSIVindependence;
19031886
return true;
19041887
}
1905-
Result.DV[Level].Splitable = false;
19061888
Result.DV[Level].Distance = SE->getZero(Delta->getType());
19071889
return false;
19081890
}

llvm/test/Analysis/DependenceAnalysis/Propagating.ll

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,8 +437,7 @@ define void @prop7(ptr %A, ptr %B, i32 %n) nounwind uwtable ssp {
437437
; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx7, align 4 --> Dst: store i32 %conv, ptr %arrayidx7, align 4
438438
; CHECK-NEXT: da analyze - none!
439439
; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx7, align 4 --> Dst: %0 = load i32, ptr %arrayidx13, align 4
440-
; CHECK-NEXT: da analyze - flow [* -38] splitable!
441-
; CHECK-NEXT: da analyze - split level = 1!
440+
; CHECK-NEXT: da analyze - flow [* -38]!
442441
; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx7, align 4 --> Dst: store i32 %0, ptr %B.addr.11, align 4
443442
; CHECK-NEXT: da analyze - confused!
444443
; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx13, align 4 --> Dst: %0 = load i32, ptr %arrayidx13, align 4

llvm/test/Analysis/DependenceAnalysis/SymbolicSIV.ll

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -332,8 +332,7 @@ define void @weaktest(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
332332
; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
333333
; CHECK-NEXT: da analyze - none!
334334
; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx2, align 4
335-
; CHECK-NEXT: da analyze - flow [*|<] splitable!
336-
; CHECK-NEXT: da analyze - split level = 1!
335+
; CHECK-NEXT: da analyze - flow [*|<]!
337336
; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
338337
; CHECK-NEXT: da analyze - confused!
339338
; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx2, align 4 --> Dst: %0 = load i32, ptr %arrayidx2, align 4

llvm/test/Analysis/DependenceAnalysis/WeakCrossingSIV.ll

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,7 @@ define void @weakcrossing1(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
6868
; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
6969
; CHECK-NEXT: da analyze - none!
7070
; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx2, align 4
71-
; CHECK-NEXT: da analyze - flow [<>] splitable!
72-
; CHECK-NEXT: da analyze - split level = 1!
71+
; CHECK-NEXT: da analyze - flow [<>]!
7372
; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.02, align 4
7473
; CHECK-NEXT: da analyze - confused!
7574
; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx2, align 4 --> Dst: %0 = load i32, ptr %arrayidx2, align 4
@@ -297,8 +296,7 @@ define void @weakcrossing6(ptr %A, ptr %B, i64 %n) nounwind uwtable ssp {
297296
; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %conv, ptr %arrayidx, align 4
298297
; CHECK-NEXT: da analyze - none!
299298
; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4
300-
; CHECK-NEXT: da analyze - flow [<>] splitable!
301-
; CHECK-NEXT: da analyze - split level = 1!
299+
; CHECK-NEXT: da analyze - flow [<>]!
302300
; CHECK-NEXT: Src: store i32 %conv, ptr %arrayidx, align 4 --> Dst: store i32 %0, ptr %B.addr.01, align 4
303301
; CHECK-NEXT: da analyze - confused!
304302
; CHECK-NEXT: Src: %0 = load i32, ptr %arrayidx1, align 4 --> Dst: %0 = load i32, ptr %arrayidx1, align 4

llvm/test/Analysis/DependenceAnalysis/run-specific-dependence-test.ll

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,7 @@ define void @weak_crossing_siv(ptr %a) {
8181
; CHECK-ALL-NEXT: Src: store i8 1, ptr %gep.0, align 1 --> Dst: store i8 1, ptr %gep.0, align 1
8282
; CHECK-ALL-NEXT: da analyze - none!
8383
; CHECK-ALL-NEXT: Src: store i8 1, ptr %gep.0, align 1 --> Dst: store i8 2, ptr %gep.1, align 1
84-
; CHECK-ALL-NEXT: da analyze - output [*|<] splitable!
85-
; CHECK-ALL-NEXT: da analyze - split level = 1!
84+
; CHECK-ALL-NEXT: da analyze - output [*|<]!
8685
; CHECK-ALL-NEXT: Src: store i8 2, ptr %gep.1, align 1 --> Dst: store i8 2, ptr %gep.1, align 1
8786
; CHECK-ALL-NEXT: da analyze - none!
8887
;
@@ -98,8 +97,7 @@ define void @weak_crossing_siv(ptr %a) {
9897
; CHECK-WEAK-CROSSING-SIV-NEXT: Src: store i8 1, ptr %gep.0, align 1 --> Dst: store i8 1, ptr %gep.0, align 1
9998
; CHECK-WEAK-CROSSING-SIV-NEXT: da analyze - consistent output [*]!
10099
; CHECK-WEAK-CROSSING-SIV-NEXT: Src: store i8 1, ptr %gep.0, align 1 --> Dst: store i8 2, ptr %gep.1, align 1
101-
; CHECK-WEAK-CROSSING-SIV-NEXT: da analyze - output [*|<] splitable!
102-
; CHECK-WEAK-CROSSING-SIV-NEXT: da analyze - split level = 1!
100+
; CHECK-WEAK-CROSSING-SIV-NEXT: da analyze - output [*|<]!
103101
; CHECK-WEAK-CROSSING-SIV-NEXT: Src: store i8 2, ptr %gep.1, align 1 --> Dst: store i8 2, ptr %gep.1, align 1
104102
; CHECK-WEAK-CROSSING-SIV-NEXT: da analyze - consistent output [*]!
105103
;

0 commit comments

Comments
 (0)