mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-25 13:24:46 +00:00
Switch over Transforms/Scalar to use the STATISTIC macro. For each statistic
converted, we lose a static initializer. This also allows GCC to emit warnings about unused statistics. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32690 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
#define DEBUG_TYPE "gcse"
|
||||
#include "llvm/Transforms/Scalar.h"
|
||||
#include "llvm/BasicBlock.h"
|
||||
#include "llvm/Constant.h"
|
||||
@@ -27,15 +28,14 @@
|
||||
#include <algorithm>
|
||||
using namespace llvm;
|
||||
|
||||
STATISTIC(NumInstRemoved, "Number of instructions removed");
|
||||
STATISTIC(NumLoadRemoved, "Number of loads removed");
|
||||
STATISTIC(NumCallRemoved, "Number of calls removed");
|
||||
STATISTIC(NumNonInsts , "Number of instructions removed due "
|
||||
"to non-instruction values");
|
||||
STATISTIC(NumArgsRepl , "Number of function arguments replaced "
|
||||
"with constant values");
|
||||
namespace {
|
||||
Statistic NumInstRemoved("gcse", "Number of instructions removed");
|
||||
Statistic NumLoadRemoved("gcse", "Number of loads removed");
|
||||
Statistic NumCallRemoved("gcse", "Number of calls removed");
|
||||
Statistic NumNonInsts ("gcse", "Number of instructions removed due "
|
||||
"to non-instruction values");
|
||||
Statistic NumArgsRepl ("gcse", "Number of function arguments replaced "
|
||||
"with constant values");
|
||||
|
||||
struct GCSE : public FunctionPass {
|
||||
virtual bool runOnFunction(Function &F);
|
||||
|
||||
|
Reference in New Issue
Block a user