[llvm-commits] [llvm-gcc-4.2] r61493 - in /llvm-gcc-4.2/trunk/gcc: ipa-inline.c passes.c

Duncan Sands baldrick at free.fr
Tue Dec 30 05:15:40 PST 2008


Author: baldrick
Date: Tue Dec 30 07:15:15 2008
New Revision: 61493

URL: http://llvm.org/viewvc/llvm-project?rev=61493&view=rev
Log:
Now that LLVM handles always_inline itself, run
gcc's early inliner rather than the full inliner.
This does a lot less inlining, and partially
fixes PR3232.  On the other hand, this may cause
regressions with webkit and friends (PR2353),
but there's only one way to find out!  Finally,
this causes 2008-03-24-BitField-And-Alloca.c to
fail, due to sroa not being strong enough.

Modified:
    llvm-gcc-4.2/trunk/gcc/ipa-inline.c
    llvm-gcc-4.2/trunk/gcc/passes.c

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

==============================================================================
--- llvm-gcc-4.2/trunk/gcc/ipa-inline.c (original)
+++ llvm-gcc-4.2/trunk/gcc/ipa-inline.c Tue Dec 30 07:15:15 2008
@@ -942,11 +942,7 @@
 	/* At the moment, no IPA passes change function bodies before inlining.
 	   Save some time by not recomputing function body sizes if early inlining
 	   already did so.  */
-        /* LLVM local begin - Don't rely on pass_early_ipa_inline being run.  */
-#ifndef ENABLE_LLVM
 	if (!flag_early_inlining)
-#endif
-        /* LLVM local end */
 	  node->local.self_insns = node->global.insns
 	     = estimate_num_insns (node->decl);
 
@@ -1033,19 +1029,9 @@
 		 overall_insns - old_insns);
     }
 
-  /* LLVM local begin */
-#ifdef ENABLE_LLVM
-  if (1) /* FIXME: 1 should be 0 some day, see PR2353.  */
-#endif
-  /* LLVM local end*/
   if (!flag_really_no_inline)
     cgraph_decide_inlining_of_small_functions ();
 
-  /* LLVM local begin */
-#ifdef ENABLE_LLVM
-  if (1) /* FIXME: 1 should be 0 some day, see PR2353.  */
-#endif
-  /* LLVM local end*/
   if (!flag_really_no_inline
       && flag_inline_functions_called_once)
     {
@@ -1163,12 +1149,6 @@
 	inlined = true;
       }
 
-  /* Now do the automatic inlining.  */
-  /* LLVM local begin */
-#ifdef ENABLE_LLVM
-  if (1) /* FIXME: 1 should be 0 some day, see PR2353.  */
-#endif
-  /* LLVM local end */
   if (!flag_really_no_inline)
     for (e = node->callees; e; e = e->next_callee)
       if (e->callee->local.inlinable

Modified: llvm-gcc-4.2/trunk/gcc/passes.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/passes.c?rev=61493&r1=61492&r2=61493&view=diff

==============================================================================
--- llvm-gcc-4.2/trunk/gcc/passes.c (original)
+++ llvm-gcc-4.2/trunk/gcc/passes.c Tue Dec 30 07:15:15 2008
@@ -482,13 +482,11 @@
   /* Interprocedural optimization passes.  */
   p = &all_ipa_passes;
   /* LLVM local begin */
+  NEXT_PASS (pass_early_ipa_inline); /* PR2353.  */
 #ifndef ENABLE_LLVM
-  NEXT_PASS (pass_early_ipa_inline);
   NEXT_PASS (pass_early_local_passes);
   NEXT_PASS (pass_ipa_cp);
-#endif
-  NEXT_PASS (pass_ipa_inline); /* LLVM: inline functions marked always_inline */
-#ifndef ENABLE_LLVM
+  NEXT_PASS (pass_ipa_inline);
   NEXT_PASS (pass_ipa_reference);
   NEXT_PASS (pass_ipa_pure_const); 
   NEXT_PASS (pass_ipa_type_escape);





More information about the llvm-commits mailing list