[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:
James Molloy 2017-02-13 14:07:25 +00:00
parent 91eadad3bd
commit 9b3b899669
3 changed files with 8 additions and 1 deletions

View File

@ -53,6 +53,7 @@ std::vector<BasicBlockInfo> computeAllBlockSizes(MachineFunction *MF);
void initializeARMLoadStoreOptPass(PassRegistry &);
void initializeARMPreAllocLoadStoreOptPass(PassRegistry &);
void initializeARMConstantIslandsPass(PassRegistry &);
} // end namespace llvm

View File

@ -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)

View File

@ -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) {