[ARM] Register ConstantIslands with the pass manager

This allows us to use -stop-before/-stop-after/-run-pass - we can now write
.mir tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294948 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
James Molloy 2017-02-13 14:07:25 +00:00
parent 083bd6368a
commit 6283084264
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) {