forked from OSchip/llvm-project
parent
57ef942306
commit
aee775a6b7
|
@ -30,9 +30,9 @@
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
static Statistic NumDeadBlocks("branchfold", "Number of dead blocks removed");
|
STATISTIC(NumDeadBlocks, "Number of dead blocks removed");
|
||||||
static Statistic NumBranchOpts("branchfold", "Number of branches optimized");
|
STATISTIC(NumBranchOpts, "Number of branches optimized");
|
||||||
static Statistic NumTailMerge ("branchfold", "Number of block tails merged");
|
STATISTIC(NumTailMerge , "Number of block tails merged");
|
||||||
static cl::opt<bool> EnableTailMerge("enable-tail-merge", cl::Hidden);
|
static cl::opt<bool> EnableTailMerge("enable-tail-merge", cl::Hidden);
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
|
@ -36,24 +36,15 @@
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
|
STATISTIC(numIntervals, "Number of original intervals");
|
||||||
|
STATISTIC(numIntervalsAfter, "Number of intervals after coalescing");
|
||||||
|
STATISTIC(numJoins , "Number of interval joins performed");
|
||||||
|
STATISTIC(numPeep , "Number of identity moves eliminated after coalescing");
|
||||||
|
STATISTIC(numFolded , "Number of loads/stores folded into instructions");
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
RegisterPass<LiveIntervals> X("liveintervals", "Live Interval Analysis");
|
RegisterPass<LiveIntervals> X("liveintervals", "Live Interval Analysis");
|
||||||
|
|
||||||
static Statistic numIntervals
|
|
||||||
("liveintervals", "Number of original intervals");
|
|
||||||
|
|
||||||
static Statistic numIntervalsAfter
|
|
||||||
("liveintervals", "Number of intervals after coalescing");
|
|
||||||
|
|
||||||
static Statistic numJoins
|
|
||||||
("liveintervals", "Number of interval joins performed");
|
|
||||||
|
|
||||||
static Statistic numPeep
|
|
||||||
("liveintervals", "Number of identity moves eliminated after coalescing");
|
|
||||||
|
|
||||||
static Statistic numFolded
|
|
||||||
("liveintervals", "Number of loads/stores folded into instructions");
|
|
||||||
|
|
||||||
static cl::opt<bool>
|
static cl::opt<bool>
|
||||||
EnableJoining("join-liveintervals",
|
EnableJoining("join-liveintervals",
|
||||||
cl::desc("Coallesce copies (default=true)"),
|
cl::desc("Coallesce copies (default=true)"),
|
||||||
|
|
|
@ -13,6 +13,7 @@
|
||||||
//
|
//
|
||||||
//===----------------------------------------------------------------------===//
|
//===----------------------------------------------------------------------===//
|
||||||
|
|
||||||
|
#define DEBUG_TYPE "phielim"
|
||||||
#include "llvm/CodeGen/LiveVariables.h"
|
#include "llvm/CodeGen/LiveVariables.h"
|
||||||
#include "llvm/CodeGen/Passes.h"
|
#include "llvm/CodeGen/Passes.h"
|
||||||
#include "llvm/CodeGen/MachineFunctionPass.h"
|
#include "llvm/CodeGen/MachineFunctionPass.h"
|
||||||
|
@ -28,10 +29,10 @@
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
namespace {
|
STATISTIC(NumAtomic, "Number of atomic phis lowered");
|
||||||
static Statistic NumAtomic("phielim", "Number of atomic phis lowered");
|
//STATISTIC(NumSimple, "Number of simple phis lowered");
|
||||||
static Statistic NumSimple("phielim", "Number of simple phis lowered");
|
|
||||||
|
|
||||||
|
namespace {
|
||||||
struct VISIBILITY_HIDDEN PNE : public MachineFunctionPass {
|
struct VISIBILITY_HIDDEN PNE : public MachineFunctionPass {
|
||||||
bool runOnMachineFunction(MachineFunction &Fn) {
|
bool runOnMachineFunction(MachineFunction &Fn) {
|
||||||
analyzePHINodes(Fn);
|
analyzePHINodes(Fn);
|
||||||
|
|
|
@ -35,17 +35,14 @@
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
|
STATISTIC(NumIters , "Number of iterations performed");
|
||||||
|
STATISTIC(NumBacktracks, "Number of times we had to backtrack");
|
||||||
|
|
||||||
|
static RegisterRegAlloc
|
||||||
|
linearscanRegAlloc("linearscan", " linear scan register allocator",
|
||||||
|
createLinearScanRegisterAllocator);
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
static Statistic NumIters
|
|
||||||
("regalloc", "Number of iterations performed");
|
|
||||||
static Statistic NumBacktracks
|
|
||||||
("regalloc", "Number of times we had to backtrack");
|
|
||||||
|
|
||||||
static RegisterRegAlloc
|
|
||||||
linearscanRegAlloc("linearscan", " linear scan register allocator",
|
|
||||||
createLinearScanRegisterAllocator);
|
|
||||||
|
|
||||||
static unsigned numIterations = 0;
|
static unsigned numIterations = 0;
|
||||||
static unsigned numIntervals = 0;
|
static unsigned numIntervals = 0;
|
||||||
|
|
||||||
|
|
|
@ -32,12 +32,11 @@
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
namespace {
|
STATISTIC(NumStores, "Number of stores added");
|
||||||
static Statistic NumStores("ra-local", "Number of stores added");
|
STATISTIC(NumLoads , "Number of loads added");
|
||||||
static Statistic NumLoads ("ra-local", "Number of loads added");
|
STATISTIC(NumFolded, "Number of loads/stores folded into instructions");
|
||||||
static Statistic NumFolded("ra-local", "Number of loads/stores folded "
|
|
||||||
"into instructions");
|
|
||||||
|
|
||||||
|
namespace {
|
||||||
static RegisterRegAlloc
|
static RegisterRegAlloc
|
||||||
localRegAlloc("local", " local register allocator",
|
localRegAlloc("local", " local register allocator",
|
||||||
createLocalRegisterAllocator);
|
createLocalRegisterAllocator);
|
||||||
|
|
|
@ -29,10 +29,10 @@
|
||||||
#include "llvm/ADT/STLExtras.h"
|
#include "llvm/ADT/STLExtras.h"
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
namespace {
|
STATISTIC(NumStores, "Number of stores added");
|
||||||
static Statistic NumStores("ra-simple", "Number of stores added");
|
STATISTIC(NumLoads , "Number of loads added");
|
||||||
static Statistic NumLoads ("ra-simple", "Number of loads added");
|
|
||||||
|
|
||||||
|
namespace {
|
||||||
static RegisterRegAlloc
|
static RegisterRegAlloc
|
||||||
simpleRegAlloc("simple", " simple register allocator",
|
simpleRegAlloc("simple", " simple register allocator",
|
||||||
createSimpleRegisterAllocator);
|
createSimpleRegisterAllocator);
|
||||||
|
|
|
@ -40,15 +40,11 @@
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
|
STATISTIC(NodesCombined , "Number of dag nodes combined");
|
||||||
|
STATISTIC(PreIndexedNodes , "Number of pre-indexed nodes created");
|
||||||
|
STATISTIC(PostIndexedNodes, "Number of post-indexed nodes created");
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
static Statistic NodesCombined ("dagcombiner",
|
|
||||||
"Number of dag nodes combined");
|
|
||||||
|
|
||||||
static Statistic PreIndexedNodes ("pre_indexed_ops",
|
|
||||||
"Number of pre-indexed nodes created");
|
|
||||||
static Statistic PostIndexedNodes ("post_indexed_ops",
|
|
||||||
"Number of post-indexed nodes created");
|
|
||||||
|
|
||||||
static cl::opt<bool>
|
static cl::opt<bool>
|
||||||
CombinerAA("combiner-alias-analysis", cl::Hidden,
|
CombinerAA("combiner-alias-analysis", cl::Hidden,
|
||||||
cl::desc("Turn on alias analysis during testing"));
|
cl::desc("Turn on alias analysis during testing"));
|
||||||
|
|
|
@ -34,10 +34,8 @@
|
||||||
#include <queue>
|
#include <queue>
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
namespace {
|
STATISTIC(NumNoops , "Number of noops inserted");
|
||||||
static Statistic NumNoops ("scheduler", "Number of noops inserted");
|
STATISTIC(NumStalls, "Number of pipeline stalls");
|
||||||
static Statistic NumStalls("scheduler", "Number of pipeline stalls");
|
|
||||||
}
|
|
||||||
|
|
||||||
static RegisterScheduler
|
static RegisterScheduler
|
||||||
tdListDAGScheduler("list-td", " Top-down list scheduler",
|
tdListDAGScheduler("list-td", " Top-down list scheduler",
|
||||||
|
|
|
@ -43,14 +43,11 @@
|
||||||
#include "llvm/ADT/STLExtras.h"
|
#include "llvm/ADT/STLExtras.h"
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
namespace {
|
STATISTIC(NumTwoAddressInstrs, "Number of two-address instructions");
|
||||||
static Statistic NumTwoAddressInstrs("twoaddressinstruction",
|
STATISTIC(NumCommuted , "Number of instructions commuted to coalesce");
|
||||||
"Number of two-address instructions");
|
STATISTIC(NumConvertedTo3Addr, "Number of instructions promoted to 3-address");
|
||||||
static Statistic NumCommuted("twoaddressinstruction",
|
|
||||||
"Number of instructions commuted to coalesce");
|
|
||||||
static Statistic NumConvertedTo3Addr("twoaddressinstruction",
|
|
||||||
"Number of instructions promoted to 3-address");
|
|
||||||
|
|
||||||
|
namespace {
|
||||||
struct VISIBILITY_HIDDEN TwoAddressInstructionPass
|
struct VISIBILITY_HIDDEN TwoAddressInstructionPass
|
||||||
: public MachineFunctionPass {
|
: public MachineFunctionPass {
|
||||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const;
|
virtual void getAnalysisUsage(AnalysisUsage &AU) const;
|
||||||
|
|
|
@ -32,14 +32,14 @@
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
using namespace llvm;
|
using namespace llvm;
|
||||||
|
|
||||||
namespace {
|
STATISTIC(NumSpills, "Number of register spills");
|
||||||
static Statistic NumSpills("spiller", "Number of register spills");
|
STATISTIC(NumStores, "Number of stores added");
|
||||||
static Statistic NumStores("spiller", "Number of stores added");
|
STATISTIC(NumLoads , "Number of loads added");
|
||||||
static Statistic NumLoads ("spiller", "Number of loads added");
|
STATISTIC(NumReused, "Number of values reused");
|
||||||
static Statistic NumReused("spiller", "Number of values reused");
|
STATISTIC(NumDSE , "Number of dead stores elided");
|
||||||
static Statistic NumDSE ("spiller", "Number of dead stores elided");
|
STATISTIC(NumDCE , "Number of copies elided");
|
||||||
static Statistic NumDCE ("spiller", "Number of copies elided");
|
|
||||||
|
|
||||||
|
namespace {
|
||||||
enum SpillerName { simple, local };
|
enum SpillerName { simple, local };
|
||||||
|
|
||||||
static cl::opt<SpillerName>
|
static cl::opt<SpillerName>
|
||||||
|
|
Loading…
Reference in New Issue