[llvm-branch-commits] [llvm-branch] r101720 - in /llvm/branches/Apple/Morbo: include/llvm/Analysis/InlineCost.h lib/Analysis/InlineCost.cpp

Dale Johannesen dalej at apple.com
Sun Apr 18 09:34:06 PDT 2010


Author: johannes
Date: Sun Apr 18 11:34:06 2010
New Revision: 101720

URL: http://llvm.org/viewvc/llvm-project?rev=101720&view=rev
Log:
Revert ALL my recent patches in an attempt to get Morbo building again.
reverts 101619+101683


Modified:
    llvm/branches/Apple/Morbo/include/llvm/Analysis/InlineCost.h
    llvm/branches/Apple/Morbo/lib/Analysis/InlineCost.cpp

Modified: llvm/branches/Apple/Morbo/include/llvm/Analysis/InlineCost.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/include/llvm/Analysis/InlineCost.h?rev=101720&r1=101719&r2=101720&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/include/llvm/Analysis/InlineCost.h (original)
+++ llvm/branches/Apple/Morbo/include/llvm/Analysis/InlineCost.h Sun Apr 18 11:34:06 2010
@@ -19,7 +19,6 @@
 #include <map>
 #include <vector>
 #include "llvm/ADT/DenseMap.h"
-#include "llvm/ADT/ValueMap.h"
 
 namespace llvm {
 
@@ -166,9 +165,7 @@
       void analyzeFunction(Function *F);
     };
 
-    // The Function* for a function can be changed (by ArgumentPromotion);
-    // the ValueMap will update itself when this happens.
-    ValueMap<const Function *, FunctionInfo> CachedFunctionInfo;
+    std::map<const Function *, FunctionInfo> CachedFunctionInfo;
 
   public:
 

Modified: llvm/branches/Apple/Morbo/lib/Analysis/InlineCost.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/Apple/Morbo/lib/Analysis/InlineCost.cpp?rev=101720&r1=101719&r2=101720&view=diff
==============================================================================
--- llvm/branches/Apple/Morbo/lib/Analysis/InlineCost.cpp (original)
+++ llvm/branches/Apple/Morbo/lib/Analysis/InlineCost.cpp Sun Apr 18 11:34:06 2010
@@ -309,14 +309,9 @@
     FunctionInfo &CallerFI = CachedFunctionInfo[Caller];
 
     // If we haven't calculated this information yet, do so now.
-    if (CallerFI.Metrics.NumBlocks == 0) {
+    if (CallerFI.Metrics.NumBlocks == 0)
       CallerFI.analyzeFunction(Caller);
 
-     // Recompute the CalleeFI pointer, getting Caller could have invalidated
-     // it.
-     CalleeFI = CachedFunctionInfo[Callee];
-   }
-
     // Don't inline a callee with dynamic alloca into a caller without them.
     // Functions containing dynamic alloca's are inefficient in various ways;
     // don't create more inefficiency.
@@ -415,7 +410,6 @@
       resetCachedCostInfo(Caller);
       return;
     }
-
     CallerFI.Metrics.NeverInline |= CalleeFI.Metrics.NeverInline;
     CallerFI.Metrics.usesDynamicAlloca |= CalleeFI.Metrics.usesDynamicAlloca;
 





More information about the llvm-branch-commits mailing list