diff options
| author | Chris Lattner <sabre@nondot.org> | 2002-07-18 06:40:04 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2002-07-18 06:40:04 +0000 |
| commit | 6801fdf009099b0469c474c2339f3e58d204091f (patch) | |
| tree | 990e6135dcd7b4aeb1f9205354af8a9ccd78177f /llvm/lib/Transforms | |
| parent | 8eedb941d3a562ed35acafc5ab5846fb8c348f2f (diff) | |
| download | bcm5719-llvm-6801fdf009099b0469c474c2339f3e58d204091f.tar.gz bcm5719-llvm-6801fdf009099b0469c474c2339f3e58d204091f.zip | |
Seperate stats for DCE'd functions and vars
llvm-svn: 2961
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/IPO/GlobalDCE.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/IPO/GlobalDCE.cpp b/llvm/lib/Transforms/IPO/GlobalDCE.cpp index 4edfb3950ea..c419ad1a0cf 100644 --- a/llvm/lib/Transforms/IPO/GlobalDCE.cpp +++ b/llvm/lib/Transforms/IPO/GlobalDCE.cpp @@ -13,7 +13,8 @@ #include "Support/DepthFirstIterator.h" #include "Support/StatisticReporter.h" -static Statistic<> NumRemoved("globaldce\t- Number of global values removed"); +static Statistic<> NumFunctions("globaldce\t- Number of functions removed"); +static Statistic<> NumVariables("globaldce\t- Number of global variables removed"); static bool RemoveUnreachableFunctions(Module &M, CallGraph &CallGraph) { // Calculate which functions are reachable from the external functions in the @@ -34,7 +35,7 @@ static bool RemoveUnreachableFunctions(Module &M, CallGraph &CallGraph) { I->dropAllReferences(); N->removeAllCalledFunctions(); FunctionsToDelete.push_back(N); - ++NumRemoved; + ++NumFunctions; } } @@ -61,7 +62,7 @@ static bool RemoveUnreachableGlobalVariables(Module &M) { ++I; // Cannot eliminate global variable else { I = M.getGlobalList().erase(I); - ++NumRemoved; + ++NumVariables; Changed = true; } return Changed; |

