[llvm-commits] [llvm] r101503 - /llvm/trunk/include/llvm/Analysis/InlineCost.h
Dale Johannesen
dalej at apple.com
Fri Apr 16 11:16:08 PDT 2010
Author: johannes
Date: Fri Apr 16 13:16:08 2010
New Revision: 101503
URL: http://llvm.org/viewvc/llvm-project?rev=101503&view=rev
Log:
Use a ValueMap not a std::map for the reason indicated
in the comment. This was causing nondeterministic changes
in inlining decisions.
Modified:
llvm/trunk/include/llvm/Analysis/InlineCost.h
Modified: llvm/trunk/include/llvm/Analysis/InlineCost.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/InlineCost.h?rev=101503&r1=101502&r2=101503&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/InlineCost.h (original)
+++ llvm/trunk/include/llvm/Analysis/InlineCost.h Fri Apr 16 13:16:08 2010
@@ -19,6 +19,7 @@
#include <map>
#include <vector>
#include "llvm/ADT/DenseMap.h"
+#include "llvm/ADT/ValueMap.h"
namespace llvm {
@@ -165,7 +166,9 @@
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:
More information about the llvm-commits
mailing list