diff options
author | Dale Johannesen <dalej@apple.com> | 2010-04-16 18:16:08 +0000 |
---|---|---|
committer | Dale Johannesen <dalej@apple.com> | 2010-04-16 18:16:08 +0000 |
commit | d4ed2a8636a1662cbf1e0f077083cf780344263e (patch) | |
tree | ef9d82012fca9f0823a4a6019e1066885a00f218 | |
parent | 53f6ed9560aa4586ba217fbf94acbfada52f561f (diff) |
Use a ValueMap not a std::map for the reason indicated
in the comment. This was causing nondeterministic changes
in inlining decisions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101503 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Analysis/InlineCost.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/llvm/Analysis/InlineCost.h b/include/llvm/Analysis/InlineCost.h index 066b943968..600892db7e 100644 --- a/include/llvm/Analysis/InlineCost.h +++ b/include/llvm/Analysis/InlineCost.h @@ -19,6 +19,7 @@ #include <map> #include <vector> #include "llvm/ADT/DenseMap.h" +#include "llvm/ADT/ValueMap.h" namespace llvm { @@ -165,7 +166,9 @@ namespace llvm { void analyzeFunction(Function *F); }; - std::map<const Function *, FunctionInfo> CachedFunctionInfo; + // The Function* for a function can be changed (by ArgumentPromotion); + // the ValueMap will update itself when this happens. + ValueMap<const Function *, FunctionInfo> CachedFunctionInfo; public: |