Add memoization for getSCEVAtScope results for instructions

which are not analyzed with SCEV techniques, which can require
brute-forcing through a large number of instructions. This
fixes a massive compile-time issue on 400.perlbench (in
particular, the loop in MD5Transform).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71259 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman
2009-05-08 20:47:27 +00:00
parent 66a7e857aa
commit 6bce643c36
2 changed files with 20 additions and 0 deletions

View File

@@ -271,6 +271,11 @@ namespace llvm {
/// exit value.
std::map<PHINode*, Constant*> ConstantEvolutionLoopExitValue;
/// ValuesAtScopes - This map contains entries for all the instructions
/// that we attempt to compute getSCEVAtScope information for without
/// using SCEV techniques, which can be expensive.
std::map<Instruction *, std::map<const Loop *, Constant *> > ValuesAtScopes;
/// createSCEV - We know that there is no SCEV for the specified value.
/// Analyze the expression.
SCEVHandle createSCEV(Value *V);