summaryrefslogtreecommitdiffstats
path: root/llvm/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
commit18ee1193bfd38637e33d635c7db31590c6925ab1 (patch)
tree5031c734487f9e4b061efe65fdcdcbe4efb18444 /llvm/lib/Target/Hexagon/HexagonExpandPredSpillCode.cpp
parent7cb710d58ce6f45ada181d0e54bc76593359fea7 (diff)
downloadbcm5719-llvm-18ee1193bfd38637e33d635c7db31590c6925ab1.tar.gz
bcm5719-llvm-18ee1193bfd38637e33d635c7db31590c6925ab1.zip
Print IR from Hexagon MI passes with -print-before/after-all.
llvm-svn: 181255
Diffstat (limited to 'llvm/lib/Target/Hexagon/HexagonExpandPredSpillCode.cpp')
-rw-r--r--llvm/lib/Target/Hexagon/HexagonExpandPredSpillCode.cpp22
1 files changed, 21 insertions, 1 deletions
diff --git a/llvm/lib/Target/Hexagon/HexagonExpandPredSpillCode.cpp b/llvm/lib/Target/Hexagon/HexagonExpandPredSpillCode.cpp
index 40dba7afe64..8a5991fbc4f 100644
--- a/llvm/lib/Target/Hexagon/HexagonExpandPredSpillCode.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud