[llvm-commits] [llvm] r56311 - /llvm/trunk/lib/Target/X86/X86FastISel.cpp
Dan Gohman
gohman at apple.com
Thu Sep 18 11:26:43 PDT 2008
Author: djg
Date: Thu Sep 18 13:26:43 2008
New Revision: 56311
URL: http://llvm.org/viewvc/llvm-project?rev=56311&view=rev
Log:
Simplify this code. The FastISel class has its own TD member.
Modified:
llvm/trunk/lib/Target/X86/X86FastISel.cpp
Modified: llvm/trunk/lib/Target/X86/X86FastISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86FastISel.cpp?rev=56311&r1=56310&r2=56311&view=diff
==============================================================================
--- llvm/trunk/lib/Target/X86/X86FastISel.cpp (original)
+++ llvm/trunk/lib/Target/X86/X86FastISel.cpp Thu Sep 18 13:26:43 2008
@@ -629,7 +629,7 @@
bool X86FastISel::X86SelectSelect(Instruction *I) {
const Type *Ty = I->getType();
if (isa<PointerType>(Ty))
- Ty = TLI.getTargetData()->getIntPtrType();
+ Ty = TD.getIntPtrType();
unsigned Opc = 0;
const TargetRegisterClass *RC = NULL;
@@ -1063,11 +1063,10 @@
}
// MachineConstantPool wants an explicit alignment.
- unsigned Align =
- TM.getTargetData()->getPreferredTypeAlignmentShift(C->getType());
+ unsigned Align = TD.getPreferredTypeAlignmentShift(C->getType());
if (Align == 0) {
// Alignment of vector types. FIXME!
- Align = TM.getTargetData()->getABITypeSize(C->getType());
+ Align = TD.getABITypeSize(C->getType());
Align = Log2_64(Align);
}
More information about the llvm-commits
mailing list