[llvm-commits] [llvm] r56248 - in /llvm/trunk: include/llvm/CodeGen/MachineConstantPool.h lib/CodeGen/MachineFunction.cpp

Dan Gohman gohman at apple.com
Tue Sep 16 13:45:54 PDT 2008


Author: djg
Date: Tue Sep 16 15:45:53 2008
New Revision: 56248

URL: http://llvm.org/viewvc/llvm-project?rev=56248&view=rev
Log:
Fix these comments to reflect current reality. Surprisingly,
MachineConstantPool::getConstantPoolIndex actually expects
a log2-encoded alignment.

Modified:
    llvm/trunk/include/llvm/CodeGen/MachineConstantPool.h
    llvm/trunk/lib/CodeGen/MachineFunction.cpp

Modified: llvm/trunk/include/llvm/CodeGen/MachineConstantPool.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/MachineConstantPool.h?rev=56248&r1=56247&r2=56248&view=diff

==============================================================================
--- llvm/trunk/include/llvm/CodeGen/MachineConstantPool.h (original)
+++ llvm/trunk/include/llvm/CodeGen/MachineConstantPool.h Tue Sep 16 15:45:53 2008
@@ -122,7 +122,8 @@
   unsigned getConstantPoolAlignment() const { return PoolAlignment; }
   
   /// getConstantPoolIndex - Create a new entry in the constant pool or return
-  /// an existing one.  User must specify an alignment in bytes for the object.
+  /// an existing one.  User must specify the log2 of the minimum required
+  /// alignment for the object.
   unsigned getConstantPoolIndex(Constant *C, unsigned Alignment);
   unsigned getConstantPoolIndex(MachineConstantPoolValue *V,unsigned Alignment);
   

Modified: llvm/trunk/lib/CodeGen/MachineFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineFunction.cpp?rev=56248&r1=56247&r2=56248&view=diff

==============================================================================
--- llvm/trunk/lib/CodeGen/MachineFunction.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineFunction.cpp Tue Sep 16 15:45:53 2008
@@ -479,7 +479,8 @@
 }
 
 /// getConstantPoolIndex - Create a new entry in the constant pool or return
-/// an existing one.  User must specify an alignment in bytes for the object.
+/// an existing one.  User must specify the log2 of the minimum required
+/// alignment for the object.
 ///
 unsigned MachineConstantPool::getConstantPoolIndex(Constant *C, 
                                                    unsigned Alignment) {





More information about the llvm-commits mailing list