summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@codeaurora.org>2015-08-05 16:12:10 +0000
committerChad Rosier <mcrosier@codeaurora.org>2015-08-05 16:12:10 +0000
commit1c81432eb6f1a6bcca1f1763aea7748a06acb6b2 (patch)
treedc35b553566b80eb70093aee362a945426497374 /llvm/lib
parent9927206f8c827bd00f1fc404a6327e97ddd1776a (diff)
downloadbcm5719-llvm-1c81432eb6f1a6bcca1f1763aea7748a06acb6b2.tar.gz
bcm5719-llvm-1c81432eb6f1a6bcca1f1763aea7748a06acb6b2.zip
[AArch64] Register (existing) AArch64BranchRelaxation pass with LLVM pass manager.
Summary: Among other things, this allows -print-after-all/-print-before-all to dump IR around this pass. llvm-svn: 244060
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/AArch64/AArch64BranchRelaxation.cpp15
1 files changed, 13 insertions, 2 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64BranchRelaxation.cpp b/llvm/lib/Target/AArch64/AArch64BranchRelaxation.cpp
index d973234dd86..ccadf0cd1eb 100644
--- a/llvm/lib/Target/AArch64/AArch64BranchRelaxation.cpp
+++ b/llvm/lib/Target/AArch64/AArch64BranchRelaxation.cpp
@@ -45,6 +45,12 @@ BCCDisplacementBits("aarch64-bcc-offset-bits", cl::Hidden, cl::init(19),
STATISTIC(NumSplit, "Number of basic blocks split");
STATISTIC(NumRelaxed, "Number of conditional branches relaxed");
+namespace llvm {
+void initializeAArch64BranchRelaxationPass(PassRegistry &);
+}
+
+#define AARCH64_BR_RELAX_NAME "AArch64 branch relaxation pass"
+
namespace {
class AArch64BranchRelaxation : public MachineFunctionPass {
/// BasicBlockInfo - Information about the offset and size of a single
@@ -93,17 +99,22 @@ class AArch64BranchRelaxation : public MachineFunctionPass {
public:
static char ID;
- AArch64BranchRelaxation() : MachineFunctionPass(ID) {}
+ AArch64BranchRelaxation() : MachineFunctionPass(ID) {
+ initializeAArch64BranchRelaxationPass(*PassRegistry::getPassRegistry());
+ }
bool runOnMachineFunction(MachineFunction &MF) override;
const char *getPassName() const override {
- return "AArch64 branch relaxation pass";
+ return AARCH64_BR_RELAX_NAME;
}
};
char AArch64BranchRelaxation::ID = 0;
}
+INITIALIZE_PASS(AArch64BranchRelaxation, "aarch64-branch-relax",
+ AARCH64_BR_RELAX_NAME, false, false)
+
/// verify - check BBOffsets, BBSizes, alignment of islands
void AArch64BranchRelaxation::verify() {
#ifndef NDEBUG
OpenPOWER on IntegriCloud