summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/PowerPC/PPCCTRLoops.cpp
diff options
context:
space:
mode:
authorKrzysztof Parzyszek <kparzysz@codeaurora.org>2013-02-13 17:40:07 +0000
committerKrzysztof Parzyszek <kparzysz@codeaurora.org>2013-02-13 17:40:07 +0000
commit2680b53d900e60ea1c285997e925d1da24ce0b4c (patch)
treeb960922b34f4d40795b23cb1ff13ee8372c23b3e /llvm/lib/Target/PowerPC/PPCCTRLoops.cpp
parent8e2637e2b00eea944e8ada6106d3cbf00c46a223 (diff)
downloadbcm5719-llvm-2680b53d900e60ea1c285997e925d1da24ce0b4c.tar.gz
bcm5719-llvm-2680b53d900e60ea1c285997e925d1da24ce0b4c.zip
Add registration for PPC-specific passes to allow the IR to be dumped
via -print-after-all. llvm-svn: 175058
Diffstat (limited to 'llvm/lib/Target/PowerPC/PPCCTRLoops.cpp')
-rw-r--r--llvm/lib/Target/PowerPC/PPCCTRLoops.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/llvm/lib/Target/PowerPC/PPCCTRLoops.cpp b/llvm/lib/Target/PowerPC/PPCCTRLoops.cpp
index a74932c1e1a..b98cc489f6d 100644
--- a/llvm/lib/Target/PowerPC/PPCCTRLoops.cpp
+++ b/llvm/lib/Target/PowerPC/PPCCTRLoops.cpp
@@ -54,6 +54,10 @@ using namespace llvm;
STATISTIC(NumCTRLoops, "Number of loops converted to CTR loops");
+namespace llvm {
+ void initializePPCCTRLoopsPass(PassRegistry&);
+}
+
namespace {
class CountValue;
struct PPCCTRLoops : public MachineFunctionPass {
@@ -64,7 +68,9 @@ namespace {
public:
static char ID; // Pass identification, replacement for typeid
- PPCCTRLoops() : MachineFunctionPass(ID) {}
+ PPCCTRLoops() : MachineFunctionPass(ID) {
+ initializePPCCTRLoopsPass(*PassRegistry::getPassRegistry());
+ }
virtual bool runOnMachineFunction(MachineFunction &MF);
@@ -174,6 +180,12 @@ namespace {
};
} // end anonymous namespace
+INITIALIZE_PASS_BEGIN(PPCCTRLoops, "ppc-ctr-loops", "PowerPC CTR Loops",
+ false, false)
+INITIALIZE_PASS_DEPENDENCY(MachineDominatorTree)
+INITIALIZE_PASS_DEPENDENCY(MachineLoopInfo)
+INITIALIZE_PASS_END(PPCCTRLoops, "ppc-ctr-loops", "PowerPC CTR Loops",
+ false, false)
/// isCompareEquals - Returns true if the instruction is a compare equals
/// instruction with an immediate operand.
OpenPOWER on IntegriCloud