diff options
author | Eli Friedman <efriedma@codeaurora.org> | 2017-09-05 22:45:23 +0000 |
---|---|---|
committer | Eli Friedman <efriedma@codeaurora.org> | 2017-09-05 22:45:23 +0000 |
commit | 06d0ee734a8b0b9f5526a61ece1b6ab77994133d (patch) | |
tree | 1e811e8ef3c80679b49e3b7a9eaed99a1652f935 /llvm/lib | |
parent | 88ee57ebed3b04d2e64bfa5c6927600174b27088 (diff) | |
download | bcm5719-llvm-06d0ee734a8b0b9f5526a61ece1b6ab77994133d.tar.gz bcm5719-llvm-06d0ee734a8b0b9f5526a61ece1b6ab77994133d.zip |
[ARM] Register ARMExpandPseudo pass.
This allows -run-pass etc. to refer to it.
(Split off from D35156.)
llvm-svn: 312587
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Target/ARM/ARM.h | 1 | ||||
-rw-r--r-- | llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp | 7 | ||||
-rw-r--r-- | llvm/lib/Target/ARM/ARMTargetMachine.cpp | 1 |
3 files changed, 8 insertions, 1 deletions
diff --git a/llvm/lib/Target/ARM/ARM.h b/llvm/lib/Target/ARM/ARM.h index 4676226acd9..3aac689c631 100644 --- a/llvm/lib/Target/ARM/ARM.h +++ b/llvm/lib/Target/ARM/ARM.h @@ -60,6 +60,7 @@ std::vector<BasicBlockInfo> computeAllBlockSizes(MachineFunction *MF); void initializeARMLoadStoreOptPass(PassRegistry &); void initializeARMPreAllocLoadStoreOptPass(PassRegistry &); void initializeARMConstantIslandsPass(PassRegistry &); +void initializeARMExpandPseudoPass(PassRegistry &); } // end namespace llvm diff --git a/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp b/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp index 18fd077c2bd..ba44e013d50 100644 --- a/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp +++ b/llvm/lib/Target/ARM/ARMExpandPseudoInsts.cpp @@ -33,6 +33,8 @@ static cl::opt<bool> VerifyARMPseudo("verify-arm-pseudo-expand", cl::Hidden, cl::desc("Verify machine code after expanding ARM pseudos")); +#define ARM_EXPAND_PSEUDO_NAME "ARM pseudo instruction expansion pass" + namespace { class ARMExpandPseudo : public MachineFunctionPass { public: @@ -52,7 +54,7 @@ namespace { } StringRef getPassName() const override { - return "ARM pseudo instruction expansion pass"; + return ARM_EXPAND_PSEUDO_NAME; } private: @@ -81,6 +83,9 @@ namespace { char ARMExpandPseudo::ID = 0; } +INITIALIZE_PASS(ARMExpandPseudo, DEBUG_TYPE, ARM_EXPAND_PSEUDO_NAME, false, + false) + /// TransferImpOps - Transfer implicit operands on the pseudo instruction to /// the instructions created from the expansion. void ARMExpandPseudo::TransferImpOps(MachineInstr &OldMI, diff --git a/llvm/lib/Target/ARM/ARMTargetMachine.cpp b/llvm/lib/Target/ARM/ARMTargetMachine.cpp index 71dc5601faf..9a191e42247 100644 --- a/llvm/lib/Target/ARM/ARMTargetMachine.cpp +++ b/llvm/lib/Target/ARM/ARMTargetMachine.cpp @@ -91,6 +91,7 @@ extern "C" void LLVMInitializeARMTarget() { initializeARMPreAllocLoadStoreOptPass(Registry); initializeARMConstantIslandsPass(Registry); initializeARMExecutionDepsFixPass(Registry); + initializeARMExpandPseudoPass(Registry); } static std::unique_ptr<TargetLoweringObjectFile> createTLOF(const Triple &TT) { |