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

Evan Cheng evan.cheng at apple.com
Wed May 21 16:47:48 PDT 2008


Author: evancheng
Date: Wed May 21 18:47:48 2008
New Revision: 51397

URL: http://llvm.org/viewvc/llvm-project?rev=51397&view=rev
Log:
Revert Duncan's ipa related changes for now. This is causing significant performance regressions, e.g. WebKit.

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=51397&r1=51396&r2=51397&view=diff

==============================================================================
--- llvm-gcc-4.2/trunk/gcc/ipa-inline.c (original)
+++ llvm-gcc-4.2/trunk/gcc/ipa-inline.c Wed May 21 18:47:48 2008
@@ -941,11 +941,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);
 
@@ -1032,19 +1028,9 @@
 		 overall_insns - old_insns);
     }
 
-  /* LLVM local begin */
-#ifdef ENABLE_LLVM
-  if (0)
-#endif
-  /* LLVM local end*/
   if (!flag_really_no_inline)
     cgraph_decide_inlining_of_small_functions ();
 
-  /* LLVM local begin */
-#ifdef ENABLE_LLVM
-  if (0)
-#endif
-  /* LLVM local end*/
   if (!flag_really_no_inline
       && flag_inline_functions_called_once)
     {
@@ -1162,11 +1148,6 @@
       }
 
   /* Now do the automatic inlining.  */
-  /* LLVM local begin */
-#ifdef ENABLE_LLVM
-  if (0)
-#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=51397&r1=51396&r2=51397&view=diff

==============================================================================
--- llvm-gcc-4.2/trunk/gcc/passes.c (original)
+++ llvm-gcc-4.2/trunk/gcc/passes.c Wed May 21 18:47:48 2008
@@ -481,20 +481,18 @@
 #define NEXT_PASS(PASS)  (p = next_pass_1 (p, &PASS))
   /* Interprocedural optimization passes.  */
   p = &all_ipa_passes;
-  /* LLVM local begin */
-#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 */
+  NEXT_PASS (pass_ipa_inline);
+/* LLVM LOCAL begin */
 #ifndef ENABLE_LLVM
   NEXT_PASS (pass_ipa_reference);
   NEXT_PASS (pass_ipa_pure_const); 
   NEXT_PASS (pass_ipa_type_escape);
   NEXT_PASS (pass_ipa_pta);
 #endif
-  /* LLVM local end */
+/* LLVM LOCAL end */
   *p = NULL;
 
   /* All passes needed to lower the function into shape optimizers can
@@ -506,9 +504,9 @@
   NEXT_PASS (pass_lower_cf);
   NEXT_PASS (pass_lower_eh);
   NEXT_PASS (pass_build_cfg);
+  NEXT_PASS (pass_lower_complex_O0);
   /* LLVM LOCAL begin */
 #ifndef ENABLE_LLVM
-  NEXT_PASS (pass_lower_complex_O0);
   NEXT_PASS (pass_lower_vector);
 #endif
   /* LLVM LOCAL end */
@@ -520,6 +518,16 @@
   /* LLVM LOCAL end */
   *p = NULL;
 
+  p = &pass_early_local_passes.sub;
+  /* LLVM LOCAL begin */
+#ifndef ENABLE_LLVM
+  NEXT_PASS (pass_tree_profile);
+#endif
+  /* LLVM LOCAL end */
+  NEXT_PASS (pass_cleanup_cfg);
+  NEXT_PASS (pass_rebuild_cgraph_edges);
+  *p = NULL;
+
   /* LLVM LOCAL begin */
 #ifdef ENABLE_LLVM
   p = &all_extra_lowering_passes;
@@ -531,14 +539,6 @@
 #endif
   /* LLVM LOCAL end */
 
-  /* LLVM LOCAL begin - Do not pull in symbols. */
-#ifndef ENABLE_LLVM
-  p = &pass_early_local_passes.sub;
-  NEXT_PASS (pass_tree_profile);
-  NEXT_PASS (pass_cleanup_cfg);
-  NEXT_PASS (pass_rebuild_cgraph_edges);
-  *p = NULL;
-
   p = &all_passes;
   NEXT_PASS (pass_fixup_cfg);
   NEXT_PASS (pass_init_datastructures);
@@ -684,6 +684,8 @@
   NEXT_PASS (pass_dce_loop);
   *p = NULL;
 
+  /* LLVM LOCAL begin */
+#ifndef ENABLE_LLVM
   p = &pass_loop2.sub;
   NEXT_PASS (pass_rtl_loop_init);
   NEXT_PASS (pass_rtl_move_loop_invariants);
@@ -759,7 +761,7 @@
   NEXT_PASS (pass_final);
   *p = NULL;
 #endif
-  /* LLVM local end */
+  /* LLVM LOCAL end */
 
 #undef NEXT_PASS
 
@@ -773,12 +775,11 @@
   register_dump_files (all_extra_lowering_passes, false,
 		       PROP_gimple_any | PROP_gimple_lcf | PROP_gimple_leh
 		       | PROP_cfg);
-#else
+#endif
+  /* LLVM LOCAL end */
   register_dump_files (all_passes, false,
 		       PROP_gimple_any | PROP_gimple_lcf | PROP_gimple_leh
 		       | PROP_cfg);
-#endif
-  /* LLVM LOCAL end */
 }
 
 static unsigned int last_verified;





More information about the llvm-commits mailing list