Renamed getTypeAlignmentShift() to getPreferredTypeAlignmentShift().
authorEvan Cheng <evan.cheng@apple.com>
Wed, 24 Jan 2007 07:03:39 +0000 (07:03 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Wed, 24 Jan 2007 07:03:39 +0000 (07:03 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33482 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/TargetData.h
lib/CodeGen/SelectionDAG/ScheduleDAG.cpp
lib/Target/Alpha/AlphaAsmPrinter.cpp
lib/Target/IA64/IA64AsmPrinter.cpp
lib/Target/TargetData.cpp

index ed56cefc073c65a42ed67a7d4725d3701d7357d9..e462814def2b8b5308d84830714a1e874ccac5ae 100644 (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.
index 2f25a6f0b8b8c2a5b13deb011ce8fac9cad944ab..eeea70d2977d2c805450d239758f9c53f3b54935 100644 (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);
index 6e36f1152344f1041d1b9ba54c61e3c4e1a7c394..eb63641ccb9d02b836f8269d4b13dc47d5b763ea 100644 (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() &&
index 4f45dc7790c87d04f1c8e68f9a9d3b94487ed4ba..2adb53e89379734661ccf9ef671c17c4ca2b8b4a 100644 (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() ||
index e9580094949c471341fc2b649945c1e2f4a49915..e950e56f56488d9d4f2b14bcc1ca3b5a06f3caed 100644 (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());