[PATCH] D29762: Properly register the ARMConstantIslands pass with PassRegistry
Asiri Rathnayake via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 13 05:40:43 PST 2017
rmaprath updated this revision to Diff 88186.
rmaprath added a comment.
Address review comments: Get rid of the unnecessary pass id definition in the llvm namespace.
https://reviews.llvm.org/D29762
Files:
lib/Target/ARM/ARM.h
lib/Target/ARM/ARMConstantIslandPass.cpp
lib/Target/ARM/ARMTargetMachine.cpp
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<TargetLoweringObjectFile> createTLOF(const Triple &TT) {
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/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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D29762.88186.patch
Type: text/x-patch
Size: 2042 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170213/30303f1e/attachment.bin>
More information about the llvm-commits
mailing list