From 1fbc3cd674788d30fdc4813a221b07da8482550f Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Thu, 18 Sep 2008 18:26:43 +0000 Subject: [PATCH] Simplify this code. The FastISel class has its own TD member. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56311 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/X86/X86FastISel.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/Target/X86/X86FastISel.cpp b/lib/Target/X86/X86FastISel.cpp index 6e23fe738b2..6662910bd43 100644 --- a/lib/Target/X86/X86FastISel.cpp +++ b/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(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); }