[llvm-commits] CVS: llvm/lib/Target/X86/FloatingPoint.cpp InstSelectSimple.cpp PeepholeOptimizer.cpp Printer.cpp X86CodeEmitter.cpp X86RegisterInfo.cpp X86SimpInstrSelector.cpp X86TargetMachine.h
Chris Lattner
lattner at cs.uiuc.edu
Wed Jun 2 01:00:19 PDT 2004
Changes in directory llvm/lib/Target/X86:
FloatingPoint.cpp updated: 1.32 -> 1.33
InstSelectSimple.cpp updated: 1.256 -> 1.257
PeepholeOptimizer.cpp updated: 1.32 -> 1.33
Printer.cpp updated: 1.98 -> 1.99
X86CodeEmitter.cpp updated: 1.60 -> 1.61
X86RegisterInfo.cpp updated: 1.80 -> 1.81
X86SimpInstrSelector.cpp updated: 1.1 -> 1.2
X86TargetMachine.h updated: 1.23 -> 1.24
---
Log message:
Convert to the new TargetMachine interface.
---
Diffs of the changes: (+11 -15)
Index: llvm/lib/Target/X86/FloatingPoint.cpp
diff -u llvm/lib/Target/X86/FloatingPoint.cpp:1.32 llvm/lib/Target/X86/FloatingPoint.cpp:1.33
--- llvm/lib/Target/X86/FloatingPoint.cpp:1.32 Sat May 1 16:27:53 2004
+++ llvm/lib/Target/X86/FloatingPoint.cpp Wed Jun 2 00:55:25 2004
@@ -177,7 +177,7 @@
/// transforming FP instructions into their stack form.
///
bool FPS::processBasicBlock(MachineFunction &MF, MachineBasicBlock &BB) {
- const TargetInstrInfo &TII = MF.getTarget().getInstrInfo();
+ const TargetInstrInfo &TII = *MF.getTarget().getInstrInfo();
bool Changed = false;
MBB = &BB;
Index: llvm/lib/Target/X86/InstSelectSimple.cpp
diff -u llvm/lib/Target/X86/InstSelectSimple.cpp:1.256 llvm/lib/Target/X86/InstSelectSimple.cpp:1.257
--- llvm/lib/Target/X86/InstSelectSimple.cpp:1.256 Sun May 23 16:23:12 2004
+++ llvm/lib/Target/X86/InstSelectSimple.cpp Wed Jun 2 00:55:25 2004
@@ -638,7 +638,7 @@
/// the current one.
///
void ISel::SelectPHINodes() {
- const TargetInstrInfo &TII = TM.getInstrInfo();
+ const TargetInstrInfo &TII = *TM.getInstrInfo();
const Function &LF = *F->getFunction(); // The LLVM function...
for (Function::const_iterator I = LF.begin(), E = LF.end(); I != E; ++I) {
const BasicBlock *BB = I;
Index: llvm/lib/Target/X86/PeepholeOptimizer.cpp
diff -u llvm/lib/Target/X86/PeepholeOptimizer.cpp:1.32 llvm/lib/Target/X86/PeepholeOptimizer.cpp:1.33
--- llvm/lib/Target/X86/PeepholeOptimizer.cpp:1.32 Fri Apr 2 01:11:10 2004
+++ llvm/lib/Target/X86/PeepholeOptimizer.cpp Wed Jun 2 00:55:25 2004
@@ -456,7 +456,7 @@
bool Changed = false;
- const TargetInstrInfo &TII = MBB.getParent()->getTarget().getInstrInfo();
+ const TargetInstrInfo &TII = *MBB.getParent()->getTarget().getInstrInfo();
// Scan the operands of this instruction. If any operands are
// register-register copies, replace the operand with the source.
Index: llvm/lib/Target/X86/Printer.cpp
diff -u llvm/lib/Target/X86/Printer.cpp:1.98 llvm/lib/Target/X86/Printer.cpp:1.99
--- llvm/lib/Target/X86/Printer.cpp:1.98 Fri May 14 01:54:57 2004
+++ llvm/lib/Target/X86/Printer.cpp Wed Jun 2 00:55:25 2004
@@ -623,7 +623,7 @@
///
void Printer::printMachineInstruction(const MachineInstr *MI) {
unsigned Opcode = MI->getOpcode();
- const TargetInstrInfo &TII = TM.getInstrInfo();
+ const TargetInstrInfo &TII = *TM.getInstrInfo();
const TargetInstrDescriptor &Desc = TII.get(Opcode);
++EmittedInsts;
@@ -921,7 +921,7 @@
MI->getOpcode() == X86::FILD64m ||
MI->getOpcode() == X86::FISTP64m) {
GasBugWorkaroundEmitter gwe(O);
- X86::emitInstruction(gwe, (X86InstrInfo&)TM.getInstrInfo(), *MI);
+ X86::emitInstruction(gwe, (X86InstrInfo&)*TM.getInstrInfo(), *MI);
}
O << TII.getName(MI->getOpcode()) << " ";
Index: llvm/lib/Target/X86/X86CodeEmitter.cpp
diff -u llvm/lib/Target/X86/X86CodeEmitter.cpp:1.60 llvm/lib/Target/X86/X86CodeEmitter.cpp:1.61
--- llvm/lib/Target/X86/X86CodeEmitter.cpp:1.60 Fri May 14 01:54:58 2004
+++ llvm/lib/Target/X86/X86CodeEmitter.cpp Wed Jun 2 00:55:25 2004
@@ -228,7 +228,7 @@
}
bool Emitter::runOnMachineFunction(MachineFunction &MF) {
- II = &((X86TargetMachine&)MF.getTarget()).getInstrInfo();
+ II = ((X86TargetMachine&)MF.getTarget()).getInstrInfo();
MCE.startFunction(MF);
MCE.emitConstantPool(MF.getConstantPool());
Index: llvm/lib/Target/X86/X86RegisterInfo.cpp
diff -u llvm/lib/Target/X86/X86RegisterInfo.cpp:1.80 llvm/lib/Target/X86/X86RegisterInfo.cpp:1.81
--- llvm/lib/Target/X86/X86RegisterInfo.cpp:1.80 Fri Apr 2 01:11:10 2004
+++ llvm/lib/Target/X86/X86RegisterInfo.cpp Wed Jun 2 00:55:25 2004
@@ -350,7 +350,7 @@
// We need to keep the stack aligned properly. To do this, we round the
// amount of space needed for the outgoing arguments up to the next
// alignment boundary.
- unsigned Align = MF.getTarget().getFrameInfo().getStackAlignment();
+ unsigned Align = MF.getTarget().getFrameInfo()->getStackAlignment();
Amount = (Amount+Align-1)/Align*Align;
MachineInstr *New;
@@ -450,7 +450,7 @@
// Round the size to a multiple of the alignment (don't forget the 4 byte
// offset though).
- unsigned Align = MF.getTarget().getFrameInfo().getStackAlignment();
+ unsigned Align = MF.getTarget().getFrameInfo()->getStackAlignment();
NumBytes = ((NumBytes+4)+Align-1)/Align*Align - 4;
}
Index: llvm/lib/Target/X86/X86SimpInstrSelector.cpp
diff -u llvm/lib/Target/X86/X86SimpInstrSelector.cpp:1.1 llvm/lib/Target/X86/X86SimpInstrSelector.cpp:1.2
--- llvm/lib/Target/X86/X86SimpInstrSelector.cpp:1.1 Tue Apr 6 14:35:17 2004
+++ llvm/lib/Target/X86/X86SimpInstrSelector.cpp Wed Jun 2 00:55:25 2004
@@ -557,7 +557,7 @@
/// the current one.
///
void ISel::SelectPHINodes() {
- const TargetInstrInfo &TII = TM.getInstrInfo();
+ const TargetInstrInfo &TII = *TM.getInstrInfo();
const Function &LF = *F->getFunction(); // The LLVM function...
for (Function::const_iterator I = LF.begin(), E = LF.end(); I != E; ++I) {
const BasicBlock *BB = I;
Index: llvm/lib/Target/X86/X86TargetMachine.h
diff -u llvm/lib/Target/X86/X86TargetMachine.h:1.23 llvm/lib/Target/X86/X86TargetMachine.h:1.24
--- llvm/lib/Target/X86/X86TargetMachine.h:1.23 Mon Mar 8 21:34:53 2004
+++ llvm/lib/Target/X86/X86TargetMachine.h Wed Jun 2 00:55:25 2004
@@ -30,17 +30,13 @@
public:
X86TargetMachine(const Module &M, IntrinsicLowering *IL);
- virtual const X86InstrInfo &getInstrInfo() const { return InstrInfo; }
- virtual const TargetFrameInfo &getFrameInfo() const { return FrameInfo; }
+ virtual const X86InstrInfo *getInstrInfo() const { return &InstrInfo; }
+ virtual const TargetFrameInfo *getFrameInfo() const { return &FrameInfo; }
virtual TargetJITInfo *getJITInfo() { return &JITInfo; }
virtual const MRegisterInfo *getRegisterInfo() const {
return &InstrInfo.getRegisterInfo();
}
- // deprecated interfaces
- virtual const TargetSchedInfo &getSchedInfo() const { abort(); }
- virtual const TargetRegInfo &getRegInfo() const { abort(); }
-
/// addPassesToEmitMachineCode - Add passes to the specified pass manager to
/// get machine code emitted. This uses a MachineCodeEmitter object to handle
/// actually outputting the machine code and resolving things like the address
More information about the llvm-commits
mailing list