[llvm-commits] CVS: llvm/lib/Target/X86/X86CodeEmitter.cpp X86FloatingPoint.cpp
Devang Patel
dpatel at apple.com
Tue May 1 14:17:47 PDT 2007
Changes in directory llvm/lib/Target/X86:
X86CodeEmitter.cpp updated: 1.133 -> 1.134
X86FloatingPoint.cpp updated: 1.68 -> 1.69
---
Log message:
Do not use typeinfo to identify pass in pass manager.
---
Diffs of the changes: (+10 -2)
X86CodeEmitter.cpp | 8 ++++++--
X86FloatingPoint.cpp | 4 ++++
2 files changed, 10 insertions(+), 2 deletions(-)
Index: llvm/lib/Target/X86/X86CodeEmitter.cpp
diff -u llvm/lib/Target/X86/X86CodeEmitter.cpp:1.133 llvm/lib/Target/X86/X86CodeEmitter.cpp:1.134
--- llvm/lib/Target/X86/X86CodeEmitter.cpp:1.133 Mon Apr 16 13:10:23 2007
+++ llvm/lib/Target/X86/X86CodeEmitter.cpp Tue May 1 16:15:46 2007
@@ -39,11 +39,14 @@
MachineCodeEmitter &MCE;
bool Is64BitMode;
public:
+ static const int ID;
explicit Emitter(TargetMachine &tm, MachineCodeEmitter &mce)
- : II(0), TD(0), TM(tm), MCE(mce), Is64BitMode(false) {}
+ : MachineFunctionPass((intptr_t)&ID), II(0), TD(0), TM(tm),
+ MCE(mce), Is64BitMode(false) {}
Emitter(TargetMachine &tm, MachineCodeEmitter &mce,
const X86InstrInfo &ii, const TargetData &td, bool is64)
- : II(&ii), TD(&td), TM(tm), MCE(mce), Is64BitMode(is64) {}
+ : MachineFunctionPass((intptr_t)&ID), II(&ii), TD(&td), TM(tm),
+ MCE(mce), Is64BitMode(is64) {}
bool runOnMachineFunction(MachineFunction &MF);
@@ -79,6 +82,7 @@
bool isX86_64ExtendedReg(const MachineOperand &MO);
unsigned determineREX(const MachineInstr &MI);
};
+ const int Emitter::ID = 0;
}
/// createX86CodeEmitterPass - Return a pass that emits the collected X86 code
Index: llvm/lib/Target/X86/X86FloatingPoint.cpp
diff -u llvm/lib/Target/X86/X86FloatingPoint.cpp:1.68 llvm/lib/Target/X86/X86FloatingPoint.cpp:1.69
--- llvm/lib/Target/X86/X86FloatingPoint.cpp:1.68 Wed Apr 25 17:13:27 2007
+++ llvm/lib/Target/X86/X86FloatingPoint.cpp Tue May 1 16:15:46 2007
@@ -52,6 +52,9 @@
namespace {
struct VISIBILITY_HIDDEN FPS : public MachineFunctionPass {
+ static const int ID;
+ FPS() : MachineFunctionPass((intptr_t)&ID) {}
+
virtual bool runOnMachineFunction(MachineFunction &MF);
virtual const char *getPassName() const { return "X86 FP Stackifier"; }
@@ -151,6 +154,7 @@
void handleCondMovFP(MachineBasicBlock::iterator &I);
void handleSpecialFP(MachineBasicBlock::iterator &I);
};
+ const int FPS::ID = 0;
}
FunctionPass *llvm::createX86FloatingPointStackifierPass() { return new FPS(); }
More information about the llvm-commits
mailing list