Fix resetCachedCostInfo to reset all of the cost information, instead of
authorDan Gohman <gohman@apple.com>
Tue, 13 Oct 2009 23:36:36 +0000 (23:36 +0000)
committerDan Gohman <gohman@apple.com>
Tue, 13 Oct 2009 23:36:36 +0000 (23:36 +0000)
just the NumBlocks field.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84056 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/InlineCost.h

index d723e75e29f84a2f5a64574d11d0323f2c26891b..7ce49d7de332f8ace0eecd45b4caea1953595846 100644 (file)
@@ -172,7 +172,7 @@ namespace llvm {
 
     /// resetCachedFunctionInfo - erase any cached cost info for this function.
     void resetCachedCostInfo(Function* Caller) {
-      CachedFunctionInfo[Caller].Metrics.NumBlocks = 0;
+      CachedFunctionInfo[Caller] = FunctionInfo();
     }
   };
 }