[llvm-commits] CVS: llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp
Chris Lattner
lattner at persephone.cs.uiuc.edu
Mon Nov 22 21:57:07 PST 2004
Changes in directory llvm/lib/Target/PowerPC:
PowerPCTargetMachine.cpp updated: 1.37 -> 1.38
---
Log message:
Move JITInfo from PPCTM to PPC32TM
---
Diffs of the changes: (+11 -6)
Index: llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp
diff -u llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp:1.37 llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp:1.38
--- llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp:1.37 Fri Nov 19 22:17:17 2004
+++ llvm/lib/Target/PowerPC/PowerPCTargetMachine.cpp Mon Nov 22 23:56:25 2004
@@ -52,12 +52,11 @@
PowerPCTargetMachine::PowerPCTargetMachine(const std::string &name,
IntrinsicLowering *IL,
const TargetData &TD,
- const PowerPCFrameInfo &TFI,
- const PowerPCJITInfo &TJI)
- : TargetMachine(name, IL, TD), FrameInfo(TFI), JITInfo(TJI)
+ const PowerPCFrameInfo &TFI)
+ : TargetMachine(name, IL, TD), FrameInfo(TFI)
{}
-unsigned PowerPCTargetMachine::getJITMatchQuality() {
+unsigned PPC32TargetMachine::getJITMatchQuality() {
return 0;
#if defined(__POWERPC__) || defined (__ppc__) || defined(_POWER)
return 10;
@@ -132,6 +131,12 @@
PM.add(createPPC32ISelSimple(TM));
PM.add(createRegisterAllocator());
PM.add(createPrologEpilogCodeInserter());
+
+ // Must run branch selection immediately preceding the asm printer
+ PM.add(createPPCBranchSelectionPass());
+
+ if (PrintMachineCode)
+ PM.add(createMachineFunctionPrinterPass(&std::cerr));
}
void PowerPCJITInfo::replaceMachineCodeForFunction(void *Old, void *New) {
@@ -143,14 +148,14 @@
PPC32TargetMachine::PPC32TargetMachine(const Module &M, IntrinsicLowering *IL)
: PowerPCTargetMachine(PPC32ID, IL,
TargetData(PPC32ID,false,4,4,4,4,4,4,2,1,4),
- PowerPCFrameInfo(*this, false), PPC32JITInfo(*this)) {}
+ PowerPCFrameInfo(*this, false)), JITInfo(*this) {}
/// PPC64TargetMachine ctor - Create a LP64 architecture model
///
PPC64TargetMachine::PPC64TargetMachine(const Module &M, IntrinsicLowering *IL)
: PowerPCTargetMachine(PPC64ID, IL,
TargetData(PPC64ID,false,8,4,4,4,4,4,2,1,4),
- PowerPCFrameInfo(*this, true), PPC64JITInfo(*this)) {}
+ PowerPCFrameInfo(*this, true)) {}
unsigned PPC32TargetMachine::getModuleMatchQuality(const Module &M) {
if (M.getEndianness() == Module::BigEndian &&
More information about the llvm-commits
mailing list