diff options
author | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2013-05-06 21:58:00 +0000 |
---|---|---|
committer | Krzysztof Parzyszek <kparzysz@codeaurora.org> | 2013-05-06 21:58:00 +0000 |
commit | 942940a3262242ac55efea88f818959f28d18bba (patch) | |
tree | 658801d49c85817c8f4067c359427d0ca0cd473a /lib/Target/Hexagon/HexagonSplitTFRCondSets.cpp | |
parent | 61e01721978af4c2979c4b9153e56e72eb6389fb (diff) | |
download | external_llvm-942940a3262242ac55efea88f818959f28d18bba.zip external_llvm-942940a3262242ac55efea88f818959f28d18bba.tar.gz external_llvm-942940a3262242ac55efea88f818959f28d18bba.tar.bz2 |
Print IR from Hexagon MI passes with -print-before/after-all.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@181255 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/Hexagon/HexagonSplitTFRCondSets.cpp')
-rw-r--r-- | lib/Target/Hexagon/HexagonSplitTFRCondSets.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/lib/Target/Hexagon/HexagonSplitTFRCondSets.cpp b/lib/Target/Hexagon/HexagonSplitTFRCondSets.cpp index df290da..8608e08 100644 --- a/lib/Target/Hexagon/HexagonSplitTFRCondSets.cpp +++ b/lib/Target/Hexagon/HexagonSplitTFRCondSets.cpp @@ -49,6 +49,11 @@ using namespace llvm; +namespace llvm { + void initializeHexagonSplitTFRCondSetsPass(PassRegistry&); +} + + namespace { class HexagonSplitTFRCondSets : public MachineFunctionPass { @@ -58,7 +63,9 @@ class HexagonSplitTFRCondSets : public MachineFunctionPass { public: static char ID; HexagonSplitTFRCondSets(const HexagonTargetMachine& TM) : - MachineFunctionPass(ID), QTM(TM), QST(*TM.getSubtargetImpl()) {} + MachineFunctionPass(ID), QTM(TM), QST(*TM.getSubtargetImpl()) { + initializeHexagonSplitTFRCondSetsPass(*PassRegistry::getPassRegistry()); + } const char *getPassName() const { return "Hexagon Split TFRCondSets"; @@ -211,6 +218,17 @@ bool HexagonSplitTFRCondSets::runOnMachineFunction(MachineFunction &Fn) { // Public Constructor Functions //===----------------------------------------------------------------------===// +static void initializePassOnce(PassRegistry &Registry) { + const char *Name = "Hexagon Split TFRCondSets"; + PassInfo *PI = new PassInfo(Name, "hexagon-split-tfr", + &HexagonSplitTFRCondSets::ID, 0, false, false); + Registry.registerPass(*PI, true); +} + +void llvm::initializeHexagonSplitTFRCondSetsPass(PassRegistry &Registry) { + CALL_ONCE_INITIALIZATION(initializePassOnce) +} + FunctionPass* llvm::createHexagonSplitTFRCondSets(const HexagonTargetMachine &TM) { return new HexagonSplitTFRCondSets(TM); |