forked from OSchip/llvm-project
[ARM] Register ConstantIslands with the pass manager
This allows us to use -stop-before/-stop-after/-run-pass - we can now write .mir tests. llvm-svn: 294948
This commit is contained in:
parent
91eadad3bd
commit
9b3b899669
|
@ -53,6 +53,7 @@ std::vector<BasicBlockInfo> computeAllBlockSizes(MachineFunction *MF);
|
|||
|
||||
void initializeARMLoadStoreOptPass(PassRegistry &);
|
||||
void initializeARMPreAllocLoadStoreOptPass(PassRegistry &);
|
||||
void initializeARMConstantIslandsPass(PassRegistry &);
|
||||
|
||||
} // end namespace llvm
|
||||
|
||||
|
|
|
@ -56,6 +56,8 @@ using namespace llvm;
|
|||
|
||||
#define DEBUG_TYPE "arm-cp-islands"
|
||||
|
||||
#define ARM_CP_ISLANDS_OPT_NAME \
|
||||
"ARM constant island placement and branch shortening pass"
|
||||
STATISTIC(NumCPEs, "Number of constpool entries");
|
||||
STATISTIC(NumSplit, "Number of uncond branches inserted");
|
||||
STATISTIC(NumCBrFixed, "Number of cond branches fixed");
|
||||
|
@ -230,7 +232,7 @@ namespace {
|
|||
}
|
||||
|
||||
StringRef getPassName() const override {
|
||||
return "ARM constant island placement and branch shortening pass";
|
||||
return ARM_CP_ISLANDS_OPT_NAME;
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -2283,3 +2285,6 @@ adjustJTTargetBlockForward(MachineBasicBlock *BB, MachineBasicBlock *JTBB) {
|
|||
FunctionPass *llvm::createARMConstantIslandPass() {
|
||||
return new ARMConstantIslands();
|
||||
}
|
||||
|
||||
INITIALIZE_PASS(ARMConstantIslands, "arm-cp-islands", ARM_CP_ISLANDS_OPT_NAME,
|
||||
false, false)
|
||||
|
|
|
@ -87,6 +87,7 @@ extern "C" void LLVMInitializeARMTarget() {
|
|||
initializeGlobalISel(Registry);
|
||||
initializeARMLoadStoreOptPass(Registry);
|
||||
initializeARMPreAllocLoadStoreOptPass(Registry);
|
||||
initializeARMConstantIslandsPass(Registry);
|
||||
}
|
||||
|
||||
static std::unique_ptr<TargetLoweringObjectFile> createTLOF(const Triple &TT) {
|
||||
|
|
Loading…
Reference in New Issue