Renamed getTypeAlignmentShift() to getPreferredTypeAlignmentShift().

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33482 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng 2007-01-24 07:03:39 +00:00
parent bc51340c85
commit de268f7dcf
5 changed files with 7 additions and 7 deletions

View File

@ -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.

View File

@ -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);

View File

@ -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() &&

View File

@ -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() ||

View File

@ -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());