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 | 5796091dfd734cac8cf4a4ca70ed937d5a94f771 (patch) | |
tree | 1839efa4d987bbbabd42d8f762adfc429f06992f /lib/Transforms | |
parent | f8dff732ae01812021389995ec41c1d9b7038b94 (diff) | |
download | external_llvm-5796091dfd734cac8cf4a4ca70ed937d5a94f771.zip external_llvm-5796091dfd734cac8cf4a4ca70ed937d5a94f771.tar.gz external_llvm-5796091dfd734cac8cf4a4ca70ed937d5a94f771.tar.bz2 |
Seperate stats for DCE'd functions and vars
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2961 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/IPO/GlobalDCE.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Transforms/IPO/GlobalDCE.cpp b/lib/Transforms/IPO/GlobalDCE.cpp index 4edfb39..c419ad1 100644 --- a/lib/Transforms/IPO/GlobalDCE.cpp +++ b/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; |