aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/Hexagon/HexagonExpandPredSpillCode.cpp
diff options
context:
space:
mode:
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>2013-05-06 21:58:00 +0000
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>2013-05-06 21:58:00 +0000
commit942940a3262242ac55efea88f818959f28d18bba (patch)
tree658801d49c85817c8f4067c359427d0ca0cd473a /lib/Target/Hexagon/HexagonExpandPredSpillCode.cpp
parent61e01721978af4c2979c4b9153e56e72eb6389fb (diff)
downloadexternal_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/HexagonExpandPredSpillCode.cpp')
-rw-r--r--lib/Target/Hexagon/HexagonExpandPredSpillCode.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/lib/Target/Hexagon/HexagonExpandPredSpillCode.cpp b/lib/Target/Hexagon/HexagonExpandPredSpillCode.cpp
index 40dba7a..8a5991f 100644
--- a/lib/Target/Hexagon/HexagonExpandPredSpillCode.cpp
+++ b/lib/Target/Hexagon/HexagonExpandPredSpillCode.cpp
@@ -41,6 +41,11 @@
using namespace llvm;
+namespace llvm {
+ void initializeHexagonExpandPredSpillCodePass(PassRegistry&);
+}
+
+
namespace {
class HexagonExpandPredSpillCode : public MachineFunctionPass {
@@ -50,7 +55,10 @@ class HexagonExpandPredSpillCode : public MachineFunctionPass {
public:
static char ID;
HexagonExpandPredSpillCode(const HexagonTargetMachine& TM) :
- MachineFunctionPass(ID), QTM(TM), QST(*TM.getSubtargetImpl()) {}
+ MachineFunctionPass(ID), QTM(TM), QST(*TM.getSubtargetImpl()) {
+ PassRegistry &Registry = *PassRegistry::getPassRegistry();
+ initializeHexagonExpandPredSpillCodePass(Registry);
+ }
const char *getPassName() const {
return "Hexagon Expand Predicate Spill Code";
@@ -175,6 +183,18 @@ bool HexagonExpandPredSpillCode::runOnMachineFunction(MachineFunction &Fn) {
// Public Constructor Functions
//===----------------------------------------------------------------------===//
+static void initializePassOnce(PassRegistry &Registry) {
+ const char *Name = "Hexagon Expand Predicate Spill Code";
+ PassInfo *PI = new PassInfo(Name, "hexagon-spill-pred",
+ &HexagonExpandPredSpillCode::ID,
+ 0, false, false);
+ Registry.registerPass(*PI, true);
+}
+
+void llvm::initializeHexagonExpandPredSpillCodePass(PassRegistry &Registry) {
+ CALL_ONCE_INITIALIZATION(initializePassOnce)
+}
+
FunctionPass*
llvm::createHexagonExpandPredSpillCode(const HexagonTargetMachine &TM) {
return new HexagonExpandPredSpillCode(TM);