[llvm-commits] [llvm-gcc-4.2] r130969 - /llvm-gcc-4.2/trunk/gcc/objc/objc-act.c

Bill Wendling isanbard at gmail.com
Thu May 5 17:14:25 PDT 2011


Author: void
Date: Thu May  5 19:14:25 2011
New Revision: 130969

URL: http://llvm.org/viewvc/llvm-project?rev=130969&view=rev
Log:
This is the llvm-gcc version of the "packing ivar offsets together" fix for
clang (r130870). Basically, we place all ivars into their own section so that if
they slide, they don't dirty as many pages as when they are mixed in with other
objects that don't "slide".
<rdar://problem/9393640>

Modified:
    llvm-gcc-4.2/trunk/gcc/objc/objc-act.c

Modified: llvm-gcc-4.2/trunk/gcc/objc/objc-act.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/objc/objc-act.c?rev=130969&r1=130968&r2=130969&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/objc/objc-act.c (original)
+++ llvm-gcc-4.2/trunk/gcc/objc/objc-act.c Thu May  5 19:14:25 2011
@@ -7725,6 +7725,14 @@
      by the front-end. Otherwise, FE asserts when attempting to do futher
      math on the tree whose one operand is one of these offsets. */
   offset = create_extern_decl (TREE_TYPE (size_zero_node), var_offset_name);
+
+  /* APPLE LOCAL begin - radar 9393640 */
+  {
+    const char string[] = "__DATA,__objc_ivar";
+    DECL_SECTION_NAME (offset) = build_string (strlen(string), string);
+  }
+  /* APPLE LOCAL end - radar 9393640 */
+
   return offset;
 }
 
@@ -7802,6 +7810,13 @@
   /* APPLE LOCAL radar 4441049 */
   offset = create_extern_decl (TREE_TYPE (size_zero_node), var_offset_name);
 
+  /* APPLE LOCAL begin - radar 9393640 */
+  {
+    const char string[] = "__DATA,__objc_ivar";
+    DECL_SECTION_NAME (offset) = build_string (strlen(string), string);
+  }
+  /* APPLE LOCAL end - radar 9393640 */
+
   ftype = TREE_TYPE (field);
 
   /* (char*)datum */
@@ -11148,6 +11163,13 @@
   /* APPLE LOCAL begin radar 4441049 */
   *chain = tree_cons (decl, byte_position (field_decl), NULL_TREE);
   /* APPLE LOCAL end radar 4441049 */
+
+  /* APPLE LOCAL begin - radar 9393640 */
+  {
+    const char string[] = "__DATA,__objc_ivar";
+    DECL_SECTION_NAME (decl) = build_string (strlen(string), string);
+  }
+  /* APPLE LOCAL end - radar 9393640 */
   
   return decl;
 }





More information about the llvm-commits mailing list