mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-23 03:59:12 +00:00
Give ScalarEvolution access to the DominatorTree. It'll need this
to make more intellegent AddRec folding decisions. llvm-svn: 93930
This commit is contained in:
parent
1b0d0247b2
commit
273322a12b
@ -181,6 +181,10 @@ namespace llvm {
|
||||
///
|
||||
TargetData *TD;
|
||||
|
||||
/// DT - The dominator tree.
|
||||
///
|
||||
DominatorTree *DT;
|
||||
|
||||
/// CouldNotCompute - This SCEV is used to represent unknown trip
|
||||
/// counts and things.
|
||||
SCEVCouldNotCompute CouldNotCompute;
|
||||
|
@ -5167,6 +5167,7 @@ ScalarEvolution::ScalarEvolution()
|
||||
bool ScalarEvolution::runOnFunction(Function &F) {
|
||||
this->F = &F;
|
||||
LI = &getAnalysis<LoopInfo>();
|
||||
DT = &getAnalysis<DominatorTree>();
|
||||
TD = getAnalysisIfAvailable<TargetData>();
|
||||
return false;
|
||||
}
|
||||
@ -5183,6 +5184,7 @@ void ScalarEvolution::releaseMemory() {
|
||||
void ScalarEvolution::getAnalysisUsage(AnalysisUsage &AU) const {
|
||||
AU.setPreservesAll();
|
||||
AU.addRequiredTransitive<LoopInfo>();
|
||||
AU.addRequiredTransitive<DominatorTree>();
|
||||
}
|
||||
|
||||
bool ScalarEvolution::hasLoopInvariantBackedgeTakenCount(const Loop *L) {
|
||||
|
Loading…
Reference in New Issue
Block a user