mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 05:22:04 +00:00
Add support for printing out statistics information when -stats is added to
the command line git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@2601 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -19,6 +19,9 @@
|
||||
#include "llvm/Module.h"
|
||||
#include "llvm/Function.h"
|
||||
#include "llvm/Pass.h"
|
||||
#include "Support/StatisticReporter.h"
|
||||
|
||||
static Statistic<> NumMerged("constmerge\t\t- Number of global constants merged");
|
||||
|
||||
// mergeDuplicateConstants - Workhorse for the pass. This eliminates duplicate
|
||||
// constants, starting at global ConstantNo, and adds vars to the map if they
|
||||
@@ -50,6 +53,7 @@ bool mergeDuplicateConstants(Module *M, unsigned &ConstantNo,
|
||||
delete GList.remove(GList.begin()+ConstantNo);
|
||||
|
||||
--ConstantNo; // Don't skip the next constant.
|
||||
++NumMerged;
|
||||
MadeChanges = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user