diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-01-24 07:03:39 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-01-24 07:03:39 +0000 |
commit | de268f7dcf8a650afde162b84608ed434fb10613 (patch) | |
tree | 250c94724432f42bc7b16bfe650b4ab95ac7fd1c | |
parent | bc51340c85e7474fd3852a5ea0c4d58d54bd4cba (diff) |
Renamed getTypeAlignmentShift() to getPreferredTypeAlignmentShift().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33482 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/Target/TargetData.h | 4 | ||||
-rw-r--r-- | lib/CodeGen/SelectionDAG/ScheduleDAG.cpp | 2 | ||||
-rw-r--r-- | lib/Target/Alpha/AlphaAsmPrinter.cpp | 2 | ||||
-rw-r--r-- | lib/Target/IA64/IA64AsmPrinter.cpp | 2 | ||||
-rw-r--r-- | lib/Target/TargetData.cpp | 4 |
5 files changed, 7 insertions, 7 deletions
diff --git a/include/llvm/Target/TargetData.h b/include/llvm/Target/TargetData.h index ed56cefc07..e462814def 100644 --- a/include/llvm/Target/TargetData.h +++ b/include/llvm/Target/TargetData.h @@ -233,10 +233,10 @@ public: /// the specified type. unsigned char getTypeAlignmentPref(const Type *Ty) const; - /// getTypeAlignmentShift - Return the preferred alignment for the + /// getPreferredTypeAlignmentShift - Return the preferred alignment for the /// specified type, returned as log2 of the value (a shift amount). /// - unsigned char getTypeAlignmentShift(const Type *Ty) const; + unsigned char getPreferredTypeAlignmentShift(const Type *Ty) const; /// getIntPtrType - Return an unsigned integer type that is the same size or /// greater to the host pointer size. diff --git a/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp b/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp index 2f25a6f0b8..eeea70d297 100644 --- a/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp +++ b/lib/CodeGen/SelectionDAG/ScheduleDAG.cpp @@ -330,7 +330,7 @@ void ScheduleDAG::AddOperand(MachineInstr *MI, SDOperand Op, const Type *Type = CP->getType(); // MachineConstantPool wants an explicit alignment. if (Align == 0) { - Align = TM.getTargetData()->getTypeAlignmentShift(Type); + Align = TM.getTargetData()->getPreferredTypeAlignmentShift(Type); if (Align == 0) { // Alignment of packed types. FIXME! Align = TM.getTargetData()->getTypeSize(Type); diff --git a/lib/Target/Alpha/AlphaAsmPrinter.cpp b/lib/Target/Alpha/AlphaAsmPrinter.cpp index 6e36f11523..eb63641ccb 100644 --- a/lib/Target/Alpha/AlphaAsmPrinter.cpp +++ b/lib/Target/Alpha/AlphaAsmPrinter.cpp @@ -212,7 +212,7 @@ bool AlphaAsmPrinter::doFinalization(Module &M) { std::string name = Mang->getValueName(I); Constant *C = I->getInitializer(); unsigned Size = TD->getTypeSize(C->getType()); - // unsigned Align = TD->getTypeAlignmentShift(C->getType()); + // unsigned Align = TD->getPreferredTypeAlignmentShift(C->getType()); unsigned Align = TD->getPreferredAlignmentLog(I); if (C->isNullValue() && diff --git a/lib/Target/IA64/IA64AsmPrinter.cpp b/lib/Target/IA64/IA64AsmPrinter.cpp index 4f45dc7790..2adb53e893 100644 --- a/lib/Target/IA64/IA64AsmPrinter.cpp +++ b/lib/Target/IA64/IA64AsmPrinter.cpp @@ -272,7 +272,7 @@ bool IA64AsmPrinter::doFinalization(Module &M) { std::string name = Mang->getValueName(I); Constant *C = I->getInitializer(); unsigned Size = TD->getTypeSize(C->getType()); - unsigned Align = TD->getTypeAlignmentShift(C->getType()); + unsigned Align = TD->getPreferredTypeAlignmentShift(C->getType()); if (C->isNullValue() && (I->hasLinkOnceLinkage() || I->hasInternalLinkage() || diff --git a/lib/Target/TargetData.cpp b/lib/Target/TargetData.cpp index e958009494..e950e56f56 100644 --- a/lib/Target/TargetData.cpp +++ b/lib/Target/TargetData.cpp @@ -450,7 +450,7 @@ unsigned char TargetData::getTypeAlignmentPref(const Type *Ty) const { return Align; } -unsigned char TargetData::getTypeAlignmentShift(const Type *Ty) const { +unsigned char TargetData::getPreferredTypeAlignmentShift(const Type *Ty) const { unsigned Align = getTypeAlignmentPref(Ty); assert(!(Align & (Align-1)) && "Alignment is not a power of two!"); return Log2_32(Align); @@ -508,7 +508,7 @@ uint64_t TargetData::getIndexedOffset(const Type *ptrTy, /// requested alignment (if the global has one). unsigned TargetData::getPreferredAlignmentLog(const GlobalVariable *GV) const { const Type *ElemType = GV->getType()->getElementType(); - unsigned Alignment = getTypeAlignmentShift(ElemType); + unsigned Alignment = getPreferredTypeAlignmentShift(ElemType); if (GV->getAlignment() > (1U << Alignment)) Alignment = Log2_32(GV->getAlignment()); |