[llvm-commits] CVS: llvm/lib/Target/X86/X86InstrInfo.cpp X86InstrInfo.h X86TargetMachine.cpp X86TargetMachine.h
Evan Cheng
evan.cheng at apple.com
Tue May 30 14:46:05 PDT 2006
Changes in directory llvm/lib/Target/X86:
X86InstrInfo.cpp updated: 1.54 -> 1.55
X86InstrInfo.h updated: 1.52 -> 1.53
X86TargetMachine.cpp updated: 1.115 -> 1.116
X86TargetMachine.h updated: 1.36 -> 1.37
---
Log message:
Fix a build breaker.
---
Diffs of the changes: (+19 -15)
X86InstrInfo.cpp | 22 ++++++++++++----------
X86InstrInfo.h | 4 +++-
X86TargetMachine.cpp | 4 ++--
X86TargetMachine.h | 4 ++--
4 files changed, 19 insertions(+), 15 deletions(-)
Index: llvm/lib/Target/X86/X86InstrInfo.cpp
diff -u llvm/lib/Target/X86/X86InstrInfo.cpp:1.54 llvm/lib/Target/X86/X86InstrInfo.cpp:1.55
--- llvm/lib/Target/X86/X86InstrInfo.cpp:1.54 Tue May 30 16:30:59 2006
+++ llvm/lib/Target/X86/X86InstrInfo.cpp Tue May 30 16:45:53 2006
@@ -13,13 +13,16 @@
#include "X86InstrInfo.h"
#include "X86.h"
+#include "X86GenInstrInfo.inc"
#include "X86InstrBuilder.h"
+#include "X86Subtarget.h"
+#include "X86TargetMachine.h"
#include "llvm/CodeGen/MachineInstrBuilder.h"
-#include "X86GenInstrInfo.inc"
using namespace llvm;
-X86InstrInfo::X86InstrInfo()
- : TargetInstrInfo(X86Insts, sizeof(X86Insts)/sizeof(X86Insts[0])) {
+X86InstrInfo::X86InstrInfo(X86TargetMachine &tm)
+ : TargetInstrInfo(X86Insts, sizeof(X86Insts)/sizeof(X86Insts[0])),
+ TM(tm) {
}
@@ -122,13 +125,12 @@
case X86::SHUFPSrri: {
assert(MI->getNumOperands() == 4 && "Unknown shufps instruction!");
const X86Subtarget *Subtarget = &TM.getSubtarget<X86Subtarget>();
- if (Subtarget->hasSSE2()) {
- unsigned A = MI->getOperand(0).getReg();
- unsigned B = MI->getOperand(1).getReg();
- unsigned C = MI->getOperand(2).getReg();
- unsigned M = MI->getOperand(3).getImmedValue();
- return BuildMI(X86::PSHUFDri, 2, A).addReg(B).addImm(M);
- }
+ if (!Subtarget->hasSSE2()) return 0;
+ unsigned A = MI->getOperand(0).getReg();
+ unsigned B = MI->getOperand(1).getReg();
+ unsigned C = MI->getOperand(2).getReg();
+ unsigned M = MI->getOperand(3).getImmedValue();
+ return BuildMI(X86::PSHUFDri, 2, A).addReg(B).addImm(M);
}
}
Index: llvm/lib/Target/X86/X86InstrInfo.h
diff -u llvm/lib/Target/X86/X86InstrInfo.h:1.52 llvm/lib/Target/X86/X86InstrInfo.h:1.53
--- llvm/lib/Target/X86/X86InstrInfo.h:1.52 Wed May 24 12:04:04 2006
+++ llvm/lib/Target/X86/X86InstrInfo.h Tue May 30 16:45:53 2006
@@ -18,6 +18,7 @@
#include "X86RegisterInfo.h"
namespace llvm {
+ class X86TargetMachine;
/// X86II - This namespace holds all of the target specific flags that
/// instruction info tracks.
@@ -168,9 +169,10 @@
}
class X86InstrInfo : public TargetInstrInfo {
+ X86TargetMachine &TM;
const X86RegisterInfo RI;
public:
- X86InstrInfo();
+ X86InstrInfo(X86TargetMachine &tm);
/// getRegisterInfo - TargetInstrInfo is a superset of MRegister info. As
/// such, whenever a client has an instance of instruction info, it should
Index: llvm/lib/Target/X86/X86TargetMachine.cpp
diff -u llvm/lib/Target/X86/X86TargetMachine.cpp:1.115 llvm/lib/Target/X86/X86TargetMachine.cpp:1.116
--- llvm/lib/Target/X86/X86TargetMachine.cpp:1.115 Sat May 20 18:28:54 2006
+++ llvm/lib/Target/X86/X86TargetMachine.cpp Tue May 30 16:45:53 2006
@@ -69,11 +69,11 @@
///
X86TargetMachine::X86TargetMachine(const Module &M, const std::string &FS)
: TargetMachine("X86"),
- DataLayout(std::string("X86"), std::string("e-p:32:32-d:32-l:32")),
Subtarget(M, FS),
+ DataLayout(std::string("X86"), std::string("e-p:32:32-d:32-l:32")),
FrameInfo(TargetFrameInfo::StackGrowsDown,
Subtarget.getStackAlignment(), -4),
- JITInfo(*this), TLInfo(*this) {
+ InstrInfo(*this), JITInfo(*this), TLInfo(*this) {
if (getRelocationModel() == Reloc::Default)
if (Subtarget.isTargetDarwin())
setRelocationModel(Reloc::DynamicNoPIC);
Index: llvm/lib/Target/X86/X86TargetMachine.h
diff -u llvm/lib/Target/X86/X86TargetMachine.h:1.36 llvm/lib/Target/X86/X86TargetMachine.h:1.37
--- llvm/lib/Target/X86/X86TargetMachine.h:1.36 Fri May 12 16:14:20 2006
+++ llvm/lib/Target/X86/X86TargetMachine.h Tue May 30 16:45:53 2006
@@ -27,10 +27,10 @@
namespace llvm {
class X86TargetMachine : public TargetMachine {
- const TargetData DataLayout; // Calculates type size & alignment
- X86InstrInfo InstrInfo;
X86Subtarget Subtarget;
+ const TargetData DataLayout; // Calculates type size & alignment
TargetFrameInfo FrameInfo;
+ X86InstrInfo InstrInfo;
X86JITInfo JITInfo;
X86TargetLowering TLInfo;
public:
More information about the llvm-commits
mailing list