aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBrian Gaeke <gaeke@uiuc.edu>2004-02-02 19:06:36 +0000
committerBrian Gaeke <gaeke@uiuc.edu>2004-02-02 19:06:36 +0000
commit03f84a969c85aa10dd6096666080ae0868eb30b6 (patch)
tree948e13745337ed29c756e4ea64a01e335dbb8eb9 /lib
parent2217bdbf688d9982842b756babed608e1f3bbe1f (diff)
downloadexternal_llvm-03f84a969c85aa10dd6096666080ae0868eb30b6.zip
external_llvm-03f84a969c85aa10dd6096666080ae0868eb30b6.tar.gz
external_llvm-03f84a969c85aa10dd6096666080ae0868eb30b6.tar.bz2
Include PowerPC.h. Flesh out the stub versions of addPassesToEmitAssembly()
and addPassesToJITCompile() slightly. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11076 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/Target/PowerPC/PowerPCTargetMachine.cpp16
1 files changed, 13 insertions, 3 deletions
diff --git a/lib/Target/PowerPC/PowerPCTargetMachine.cpp b/lib/Target/PowerPC/PowerPCTargetMachine.cpp
index 27fceba..88b33f0 100644
--- a/lib/Target/PowerPC/PowerPCTargetMachine.cpp
+++ b/lib/Target/PowerPC/PowerPCTargetMachine.cpp
@@ -11,6 +11,7 @@
//===----------------------------------------------------------------------===//
#include "PowerPCTargetMachine.h"
+#include "PowerPC.h"
#include "llvm/Module.h"
#include "llvm/PassManager.h"
#include "llvm/Target/TargetMachineImpls.h"
@@ -35,17 +36,26 @@ PowerPCTargetMachine::PowerPCTargetMachine(const Module &M,
FrameInfo(TargetFrameInfo::StackGrowsDown, 8, 4), JITInfo(*this) {
}
-// addPassesToEmitAssembly - We currently use all of the same passes as the JIT
-// does to emit statically compiled machine code.
+/// addPassesToEmitAssembly - Add passes to the specified pass manager
+/// to implement a static compiler for this target.
+///
bool PowerPCTargetMachine::addPassesToEmitAssembly(PassManager &PM,
std::ostream &Out) {
- return true;
+ // <insert instruction selector passes here>
+ PM.add(createRegisterAllocator());
+ PM.add(createPrologEpilogCodeInserter());
+ // <insert assembly code output passes here>
+ PM.add(createMachineCodeDeleter());
+ return true; // change to `return false' when this actually works.
}
/// addPassesToJITCompile - Add passes to the specified pass manager to
/// implement a fast dynamic compiler for this target.
///
void PowerPCJITInfo::addPassesToJITCompile(FunctionPassManager &PM) {
+ // <insert instruction selector passes here>
+ PM.add(createRegisterAllocator());
+ PM.add(createPrologEpilogCodeInserter());
}
} // end namespace llvm