[llvm-commits] [llvm-gcc-4.2] r63497 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp

Chris Lattner sabre at nondot.org
Sun Feb 1 22:28:50 PST 2009


Author: lattner
Date: Mon Feb  2 00:28:48 2009
New Revision: 63497

URL: http://llvm.org/viewvc/llvm-project?rev=63497&view=rev
Log:
it is unclear whether this code was really safe or not, and
it seems unlikely that it is.  #if 0 it out for llvm 2.5
until we get resolution.

Modified:
    llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp

Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=63497&r1=63496&r2=63497&view=diff

==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Mon Feb  2 00:28:48 2009
@@ -6181,7 +6181,10 @@
       // offset, the field is known to be 4-byte aligned.
       LVAlign = MinAlign(LVAlign, Offset);
     }
-    
+
+    // There is debate about whether this is really safe or not, be conservative
+    // in the meantime.
+#if 0
     // If this field is at a constant offset, if the LLVM pointer really points
     // to it, then we know that the pointer is at least as aligned as the field
     // is required to be.  Try to round up our alignment info.
@@ -6189,6 +6192,7 @@
         !isBitfield(FieldDecl) &&  // bitfield computation might offset pointer.
         DECL_ALIGN(FieldDecl))
       LVAlign = std::max(LVAlign, unsigned(DECL_ALIGN(FieldDecl)) / 8);
+#endif
     
     // If the FIELD_DECL has an annotate attribute on it, emit it.
     if (lookup_attribute("annotate", DECL_ATTRIBUTES(FieldDecl)))





More information about the llvm-commits mailing list