Index: lib/Target/ARM/ARM.h =================================================================== --- lib/Target/ARM/ARM.h +++ lib/Target/ARM/ARM.h @@ -53,7 +53,7 @@ void initializeARMLoadStoreOptPass(PassRegistry &); void initializeARMPreAllocLoadStoreOptPass(PassRegistry &); - +void initializeARMConstantIslandsPass(PassRegistry &); } // end namespace llvm #endif // LLVM_LIB_TARGET_ARM_ARM_H Index: lib/Target/ARM/ARMConstantIslandPass.cpp =================================================================== --- lib/Target/ARM/ARMConstantIslandPass.cpp +++ lib/Target/ARM/ARMConstantIslandPass.cpp @@ -55,6 +55,8 @@ using namespace llvm; #define DEBUG_TYPE "arm-cp-islands" +#define ARM_CONSTANT_ISLANDS_PASS_NAME \ + "ARM constant island placement and branch shortening pass" STATISTIC(NumCPEs, "Number of constpool entries"); STATISTIC(NumSplit, "Number of uncond branches inserted"); @@ -230,7 +232,7 @@ } StringRef getPassName() const override { - return "ARM constant island placement and branch shortening pass"; + return ARM_CONSTANT_ISLANDS_PASS_NAME; } private: @@ -287,11 +289,12 @@ U.getMaxDisp(), U.NegOk, U.IsSoImm); } }; - - char ARMConstantIslands::ID = 0; - } // end anonymous namespace +char ARMConstantIslands::ID = 0; +INITIALIZE_PASS(ARMConstantIslands, DEBUG_TYPE, ARM_CONSTANT_ISLANDS_PASS_NAME, + false, false) + /// verify - check BBOffsets, BBSizes, alignment of islands void ARMConstantIslands::verify() { #ifndef NDEBUG Index: lib/Target/ARM/ARMTargetMachine.cpp =================================================================== --- lib/Target/ARM/ARMTargetMachine.cpp +++ lib/Target/ARM/ARMTargetMachine.cpp @@ -87,6 +87,7 @@ initializeGlobalISel(Registry); initializeARMLoadStoreOptPass(Registry); initializeARMPreAllocLoadStoreOptPass(Registry); + initializeARMConstantIslandsPass(Registry); } static std::unique_ptr createTLOF(const Triple &TT) {