[llvm-commits] [llvm-gcc-4.2] r85992 - in /llvm-gcc-4.2/trunk/gcc: config/darwin.h llvm-backend.cpp

Bill Wendling isanbard at gmail.com
Tue Nov 3 17:24:05 PST 2009


Author: void
Date: Tue Nov  3 19:24:04 2009
New Revision: 85992

URL: http://llvm.org/viewvc/llvm-project?rev=85992&view=rev
Log:
Reverting r84717. fldry is generating aligned loads of strings. It requires the
strings to be 16-byte aligned, which this breaks.

Modified:
    llvm-gcc-4.2/trunk/gcc/config/darwin.h
    llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp

Modified: llvm-gcc-4.2/trunk/gcc/config/darwin.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/config/darwin.h?rev=85992&r1=85991&r2=85992&view=diff

==============================================================================
--- llvm-gcc-4.2/trunk/gcc/config/darwin.h (original)
+++ llvm-gcc-4.2/trunk/gcc/config/darwin.h Tue Nov  3 19:24:04 2009
@@ -698,21 +698,10 @@
       char *N = (char *)alloca(strlen(fmt) + 37);                       \
       sprintf(N, fmt, i++);                                             \
       GV->setName(N);                                                   \
-      GV->setAlignment(TARGET_64BIT ? 8 : 4);                           \
     }                                                                   \
   } while (0)
 /* LLVM LOCAL - end radar 6389998 */
 
-/* LLVM LOCAL - begin radar 7291825 */
-/* Give a constant string a sufficient alignment for the platform.  */
-#define TARGET_ADJUST_CSTRING_ALIGN(GV)                                 \
-  do {                                                                  \
-    if (GV->hasInternalLinkage()) {                                     \
-      GV->setAlignment(TARGET_64BIT ? 8 : 4);                           \
-    }                                                                   \
-  } while (0)
-/* LLVM LOCAL - end radar 7291825 */
-
 #endif
 /* LLVM LOCAL end */
 

Modified: llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp?rev=85992&r1=85991&r2=85992&view=diff

==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp Tue Nov  3 19:24:04 2009
@@ -1415,16 +1415,8 @@
       unsigned TargetAlign =
         getTargetData().getABITypeAlignment(GV->getType()->getElementType());
       if (DECL_USER_ALIGN(decl) ||
-          8 * TargetAlign < (unsigned)DECL_ALIGN(decl)) {
+          8 * TargetAlign < (unsigned)DECL_ALIGN(decl))
         GV->setAlignment(DECL_ALIGN(decl) / 8);
-      }
-#ifdef TARGET_ADJUST_CSTRING_ALIGN
-      else if (DECL_INITIAL(decl) != error_mark_node && // uninitialized?
-               DECL_INITIAL(decl) &&
-               TREE_CODE(DECL_INITIAL(decl)) == STRING_CST) {
-        TARGET_ADJUST_CSTRING_ALIGN(GV);
-      }
-#endif
     }
 
     // Handle used decls





More information about the llvm-commits mailing list