[llvm-commits] [llvm-gcc-4.2] r64878 - in /llvm-gcc-4.2/trunk/gcc: tree-inline.c tree-optimize.c

Evan Cheng evan.cheng at apple.com
Tue Feb 17 19:05:24 PST 2009


Author: evancheng
Date: Tue Feb 17 21:05:23 2009
New Revision: 64878

URL: http://llvm.org/viewvc/llvm-project?rev=64878&view=rev
Log:
Turns out 64819 isn't safe. It can trigger verify_cgraph_node failure later. gcc is relying on some optimization pass to clear certain states. Nice. This fixes that and just disable -Winline warnings instead.

Modified:
    llvm-gcc-4.2/trunk/gcc/tree-inline.c
    llvm-gcc-4.2/trunk/gcc/tree-optimize.c

Modified: llvm-gcc-4.2/trunk/gcc/tree-inline.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/tree-inline.c?rev=64878&r1=64877&r2=64878&view=diff

==============================================================================
--- llvm-gcc-4.2/trunk/gcc/tree-inline.c (original)
+++ llvm-gcc-4.2/trunk/gcc/tree-inline.c Tue Feb 17 21:05:23 2009
@@ -2037,6 +2037,8 @@
      inlining.  */
   if (!cgraph_inline_p (cg_edge, &reason))
     {
+/* LLVM LOCAL begin */
+#ifndef ENABLE_LLVM
       if (lookup_attribute ("always_inline", DECL_ATTRIBUTES (fn))
 	  /* Avoid warnings during early inline pass. */
 	  && (!flag_unit_at_a_time || cgraph_global_info_ready))
@@ -2057,6 +2059,8 @@
 		   fn, reason);
 	  warning (OPT_Winline, "called from here");
 	}
+#endif
+/* LLVM LOCAL end */
       goto egress;
     }
   fn = cg_edge->callee->decl;

Modified: llvm-gcc-4.2/trunk/gcc/tree-optimize.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/tree-optimize.c?rev=64878&r1=64877&r2=64878&view=diff

==============================================================================
--- llvm-gcc-4.2/trunk/gcc/tree-optimize.c (original)
+++ llvm-gcc-4.2/trunk/gcc/tree-optimize.c Tue Feb 17 21:05:23 2009
@@ -439,8 +439,6 @@
   cfun->x_dont_save_pending_sizes_p = 1;
   cfun->after_inlining = true;
 
-/* LLVM LOCAL begin */
-#ifndef ENABLE_LLVM
   if (flag_inline_trees)
     {
       struct cgraph_edge *e;
@@ -454,8 +452,6 @@
 	  timevar_pop (TV_INTEGRATION);
 	}
     }
-#endif
-/* LLVM LOCAL end */
   /* In non-unit-at-a-time we must mark all referenced functions as needed.
      */
   if (!flag_unit_at_a_time)





More information about the llvm-commits mailing list