Update comments to make it clear that the function alignment is the Log2 of the
authorBill Wendling <isanbard@gmail.com>
Wed, 1 Jul 2009 18:50:55 +0000 (18:50 +0000)
committerBill Wendling <isanbard@gmail.com>
Wed, 1 Jul 2009 18:50:55 +0000 (18:50 +0000)
bytes and not bytes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74624 91177308-0d34-0410-b5e6-96231b3b80d8

23 files changed:
include/llvm/CodeGen/MachineFunction.h
include/llvm/Target/TargetLowering.h
lib/Target/ARM/ARMISelLowering.cpp
lib/Target/ARM/ARMISelLowering.h
lib/Target/Alpha/AlphaISelLowering.cpp
lib/Target/Alpha/AlphaISelLowering.h
lib/Target/CellSPU/SPUISelLowering.cpp
lib/Target/CellSPU/SPUISelLowering.h
lib/Target/IA64/IA64ISelLowering.cpp
lib/Target/IA64/IA64ISelLowering.h
lib/Target/MSP430/MSP430ISelLowering.cpp
lib/Target/MSP430/MSP430ISelLowering.h
lib/Target/Mips/MipsISelLowering.cpp
lib/Target/Mips/MipsISelLowering.h
lib/Target/PIC16/PIC16ISelLowering.h
lib/Target/PowerPC/PPCISelLowering.cpp
lib/Target/PowerPC/PPCISelLowering.h
lib/Target/Sparc/SparcISelLowering.cpp
lib/Target/Sparc/SparcISelLowering.h
lib/Target/X86/X86ISelLowering.cpp
lib/Target/X86/X86ISelLowering.h
lib/Target/XCore/XCoreISelLowering.cpp
lib/Target/XCore/XCoreISelLowering.h

index e9cecf9d682ca939c18b4edcd88acd3e05c89402..73f55463e820c8cec9c57e6879d9b680e3abf8bb 100644 (file)
@@ -151,11 +151,11 @@ public:
   MachineConstantPool *getConstantPool() { return ConstantPool; }
   const MachineConstantPool *getConstantPool() const { return ConstantPool; }
 
-  /// getAlignment - Return the alignment of the function.
+  /// getAlignment - Return the alignment (log2, not bytes) of the function.
   ///
   unsigned getAlignment() const { return Alignment; }
 
-  /// setAlignment - Set the alignment of the function.
+  /// setAlignment - Set the alignment (log2, not bytes) of the function.
   ///
   void setAlignment(unsigned A) { Alignment = A; }
 
index e52880fe95652acc42b12d05882f645df7b43386..9b2d4afc92e3af8df08d1c26aac563fa2159cb50 100644 (file)
@@ -736,7 +736,7 @@ public:
   /// PIC relocation models.
   virtual bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const;
 
-  /// getFunctionAlignment - Return the alignment of this function.
+  /// getFunctionAlignment - Return the Log2 alignment of this function.
   virtual unsigned getFunctionAlignment(const Function *) const = 0;
 
   //===--------------------------------------------------------------------===//
index d5a677a550ad8aa8d4fcac8274bacdf8b5301dcd..15f8588ba5cf092308e152ec8aaef98316c4532c 100644 (file)
@@ -455,7 +455,7 @@ const char *ARMTargetLowering::getTargetNodeName(unsigned Opcode) const {
   }
 }
 
-/// getFunctionAlignment - Return the alignment of this function.
+/// getFunctionAlignment - Return the Log2 alignment of this function.
 unsigned ARMTargetLowering::getFunctionAlignment(const Function *F) const {
   return getTargetMachine().getSubtarget<ARMSubtarget>().isThumb() ? 1 : 2;
 }
index a546b822013414f5bd8d0dc6f055b3c7cf18287b..553a86d077b716cdc26f8f748ffcaa8bb7e916c0 100644 (file)
@@ -197,7 +197,7 @@ namespace llvm {
       return Subtarget;
     }
 
-    /// getFunctionAlignment - Return the alignment of this function.
+    /// getFunctionAlignment - Return the Log2 alignment of this function.
     virtual unsigned getFunctionAlignment(const Function *F) const;
 
   private:
index b70c2aca5785db80ec8c2522b456e97303789b0a..7a8837cbb3c4a8fda9f1bcbc4033b6483dca0d38 100644 (file)
@@ -181,7 +181,7 @@ const char *AlphaTargetLowering::getTargetNodeName(unsigned Opcode) const {
   }
 }
 
-/// getFunctionAlignment - Return the function alignment.
+/// getFunctionAlignment - Return the Log2 alignment of this function.
 unsigned AlphaTargetLowering::getFunctionAlignment(const Function *F) const {
   return 4;
 }
index 1d6fad6bfa539fa3e24a5954300a1d0c9c3b2c2c..0a843c24e71bbf7d33495527ad0d2596708e98a5 100644 (file)
@@ -103,7 +103,7 @@ namespace llvm {
 
     virtual bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const;
 
-    /// getFunctionAlignment - Return the function alignment.
+    /// getFunctionAlignment - Return the Log2 alignment of this function.
     virtual unsigned getFunctionAlignment(const Function *F) const;
 
   private:
index f16d7d8895918807b34e57248fe20090e2da3b1f..faaccc3aa64b16dee578043a88ea53dd1407be97 100644 (file)
@@ -481,7 +481,7 @@ SPUTargetLowering::getTargetNodeName(unsigned Opcode) const
   return ((i != node_names.end()) ? i->second : 0);
 }
 
-/// getFunctionAlignment - Return the function alignment.
+/// getFunctionAlignment - Return the Log2 alignment of this function.
 unsigned SPUTargetLowering::getFunctionAlignment(const Function *) const {
   return 3;
 }
index 09c3d78a555d058440a2a4d93f03a2c6cc53994b..06b30da0e24bd4fd84a7fff27229f6fd48227468 100644 (file)
@@ -149,7 +149,7 @@ namespace llvm {
 
     virtual bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const;
 
-    /// getFunctionAlignment - Return the function alignment.
+    /// getFunctionAlignment - Return the Log2 alignment of this function.
     virtual unsigned getFunctionAlignment(const Function *F) const;
   };
 }
index 0142a55913292214410ed690908608026d4ac2e9..f5e82a79a71ca85dbb2980161d8d14d07be26ac9 100644 (file)
@@ -148,7 +148,7 @@ MVT IA64TargetLowering::getSetCCResultType(MVT VT) const {
   return MVT::i1;
 }
 
-/// getFunctionAlignment - Return the function alignment.
+/// getFunctionAlignment - Return the Log2 alignment of this function.
 unsigned IA64TargetLowering::getFunctionAlignment(const Function *) const {
   return 5;
 }
index e586f7449b7cd80be8e958f855ab4ec3a702aed6..c552d13b76691c94343cdb8f79544ba09a71ed20 100644 (file)
@@ -70,7 +70,7 @@ namespace llvm {
     /// (currently, only "ret void")
     virtual SDValue LowerOperation(SDValue Op, SelectionDAG &DAG);
     
-    /// getFunctionAlignment - Return the function alignment.
+    /// getFunctionAlignment - Return the Log2 alignment of this function.
     virtual unsigned getFunctionAlignment(const Function *F) const;
   };
 }
index d57ae82f3fe6077d06542511cbf4929c6308e7dc..91a8663a632c3fd93d8d5351300606317be9de87 100644 (file)
@@ -127,7 +127,7 @@ SDValue MSP430TargetLowering::LowerOperation(SDValue Op, SelectionDAG &DAG) {
   }
 }
 
-/// getFunctionAlignment - Return the alignment of this function.
+/// getFunctionAlignment - Return the Log2 alignment of this function.
 unsigned MSP430TargetLowering::getFunctionAlignment(const Function *F) const {
   return F->hasFnAttr(Attribute::OptimizeForSize) ? 1 : 4;
 }
index fcbec59c871b9f6cf4c146e82b19bdb40890fea1..4a90a0eb26390eacf68ff4ba4281b6d3dbf6c73d 100644 (file)
@@ -74,7 +74,7 @@ namespace llvm {
     /// DAG node.
     virtual const char *getTargetNodeName(unsigned Opcode) const;
 
-    /// getFunctionAlignment - Return the alignment of this function.
+    /// getFunctionAlignment - Return the Log2 alignment of this function.
     virtual unsigned getFunctionAlignment(const Function *F) const;
 
     SDValue LowerFORMAL_ARGUMENTS(SDValue Op, SelectionDAG &DAG);
index 7d01fa2e21258ba4dbc46da55fce000ab2fa7a75..3d2e2b7a773d2b0e33966a5994129d58c8adeb4b 100644 (file)
@@ -158,7 +158,7 @@ MVT MipsTargetLowering::getSetCCResultType(MVT VT) const {
   return MVT::i32;
 }
 
-/// getFunctionAlignment - Return the function alignment.
+/// getFunctionAlignment - Return the Log2 alignment of this function.
 unsigned MipsTargetLowering::getFunctionAlignment(const Function *) const {
   return 2;
 }
index daef0ad60777b68751ed8fa4892a95dc2095aa55..459be0a5e26e0d5dfa706e99b6280242d50f3ab0 100644 (file)
@@ -84,7 +84,7 @@ namespace llvm {
     /// getSetCCResultType - get the ISD::SETCC result ValueType
     MVT getSetCCResultType(MVT VT) const;
 
-    /// getFunctionAlignment - Return the function alignment.
+    /// getFunctionAlignment - Return the Log2 alignment of this function.
     virtual unsigned getFunctionAlignment(const Function *F) const;
   private:
     // Subtarget Info
index d5008c300780a6ed0fdb798a28a7601656004713..b40ea12c15f6a7849aab9218113c8076cbe5c1e4 100644 (file)
@@ -145,7 +145,7 @@ namespace llvm {
     unsigned GetTmpSize() { return TmpSize; }
     void SetTmpSize(unsigned Size) { TmpSize = Size; }
 
-    /// getFunctionAlignment - Return the function alignment.
+    /// getFunctionAlignment - Return the Log2 alignment of this function.
     virtual unsigned getFunctionAlignment(const Function *) const {
       // FIXME: The function never seems to be aligned.
       return 1;
index cf17599e29a140c9328847b2e6c4445adef53f07..50d16b13703a750517d96e4917b54a8d3ed5afbd 100644 (file)
@@ -432,7 +432,7 @@ MVT PPCTargetLowering::getSetCCResultType(MVT VT) const {
   return MVT::i32;
 }
 
-/// getFunctionAlignment - Return the function alignment.
+/// getFunctionAlignment - Return the Log2 alignment of this function.
 unsigned PPCTargetLowering::getFunctionAlignment(const Function *F) const {
   if (getTargetMachine().getSubtarget<PPCSubtarget>().isDarwin())
     return F->hasFnAttr(Attribute::OptimizeForSize) ? 2 : 4;
index d7dd75d1d131d7d3dae4abe1878cb7898099a856..0c06f76e7559deeebc512aa3fb56c960b718911e 100644 (file)
@@ -337,7 +337,7 @@ namespace llvm {
 
     virtual bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const;
 
-    /// getFunctionAlignment - Return the function alignment.
+    /// getFunctionAlignment - Return the Log2 alignment of this function.
     virtual unsigned getFunctionAlignment(const Function *F) const;
 
   private:
index 70096490d35fc5a872d60472e391a6e629353eb9..4c3efde36fe19c5b0e9bc007248407dc93522f58 100644 (file)
@@ -1048,7 +1048,7 @@ SparcTargetLowering::isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const {
   return false;
 }
 
-/// getFunctionAlignment - Return the function alignment.
+/// getFunctionAlignment - Return the Log2 alignment of this function.
 unsigned SparcTargetLowering::getFunctionAlignment(const Function *) const {
   return 4;
 }
index 0aa5dbbf9c23fa9bb767671355f57976de2a8734..27ce1b76cc79df35120560cc555097d93e60f2c2 100644 (file)
@@ -74,7 +74,7 @@ namespace llvm {
 
     virtual bool isOffsetFoldingLegal(const GlobalAddressSDNode *GA) const;
 
-    /// getFunctionAlignment - Return the function alignment.
+    /// getFunctionAlignment - Return the Log2 alignment of this function.
     virtual unsigned getFunctionAlignment(const Function *F) const;
   };
 } // end namespace llvm
index 64ba5b66c63c5304588d99045612eaf4efe99367..82e88ad1a458a43f686c85dd16821caad6b102bf 100644 (file)
@@ -1027,7 +1027,7 @@ SDValue X86TargetLowering::getPICJumpTableRelocBase(SDValue Table,
   return Table;
 }
 
-/// getFunctionAlignment - Return the alignment of this function.
+/// getFunctionAlignment - Return the Log2 alignment of this function.
 unsigned X86TargetLowering::getFunctionAlignment(const Function *F) const {
   return F->hasFnAttr(Attribute::OptimizeForSize) ? 1 : 4;
 }
index 00d1784aae5908de461e1c6794288c6d3a4ebdcc..ffed46c733aaf9659a8843f6b4ed2979d34b4362 100644 (file)
@@ -534,7 +534,7 @@ namespace llvm {
 #endif
                    );
 
-    /// getFunctionAlignment - Return the alignment of this function.
+    /// getFunctionAlignment - Return the Log2 alignment of this function.
     virtual unsigned getFunctionAlignment(const Function *F) const;
 
   private:
index 0b65ceee60a7884fa4d3014bedbd677c061d6a91..cc11d32481395aa2a676844f8fa98565e35fd6d2 100644 (file)
@@ -187,7 +187,7 @@ void XCoreTargetLowering::ReplaceNodeResults(SDNode *N,
   }
 }
 
-/// getFunctionAlignment - Return the alignment of this function.
+/// getFunctionAlignment - Return the Log2 alignment of this function.
 unsigned XCoreTargetLowering::
 getFunctionAlignment(const Function *) const {
   return 1;
index 4f962fa2b4a9f6f372066e20767cba70874214c3..753ea819c2bdbeb2cce6595edf081f736c76f61b 100644 (file)
@@ -84,7 +84,7 @@ namespace llvm {
     virtual bool isLegalAddressingMode(const AddrMode &AM,
                                        const Type *Ty) const;
 
-    /// getFunctionAlignment - Return the alignment of this function.
+    /// getFunctionAlignment - Return the Log2 alignment of this function.
     virtual unsigned getFunctionAlignment(const Function *F) const;
 
   private: