diff options
| author | Dan Gohman <gohman@apple.com> | 2008-09-18 18:26:43 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2008-09-18 18:26:43 +0000 |
| commit | e91edeb61c0cce656af01a2a2267ede75e514c3a (patch) | |
| tree | ccd184ef74bf8095479b3c250f6fecf47cfa5cf5 | |
| parent | f3d647e00bd25ad39005c49e66e5f9714dafb7fa (diff) | |
| download | bcm5719-llvm-e91edeb61c0cce656af01a2a2267ede75e514c3a.tar.gz bcm5719-llvm-e91edeb61c0cce656af01a2a2267ede75e514c3a.zip | |
Simplify this code. The FastISel class has its own TD member.
llvm-svn: 56311
| -rw-r--r-- | llvm/lib/Target/X86/X86FastISel.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/llvm/lib/Target/X86/X86FastISel.cpp b/llvm/lib/Target/X86/X86FastISel.cpp index 6e23fe738b2..6662910bd43 100644 --- a/llvm/lib/Target/X86/X86FastISel.cpp +++ b/llvm/lib/Target/X86/X86FastISel.cpp @@ -629,7 +629,7 @@ bool X86FastISel::X86SelectShift(Instruction *I) { 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 @@ unsigned X86FastISel::TargetMaterializeConstant(Constant *C) { } // 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); } |

