[llvm-commits] [llvm-gcc-4.2] r61826 - in /llvm-gcc-4.2/trunk/gcc: cgraphunit.c passes.c tree-pass.h
Duncan Sands
baldrick at free.fr
Tue Jan 6 14:26:39 PST 2009
Author: baldrick
Date: Tue Jan 6 16:26:39 2009
New Revision: 61826
URL: http://llvm.org/viewvc/llvm-project?rev=61826&view=rev
Log:
Completely disable the gcc inliner: experiments
seem to show that running the early inliner is
not helping performance. While there, enable
pass_fold_builtins which looks like it was not
actually being run though the intention was
clearly that it should be.
Modified:
llvm-gcc-4.2/trunk/gcc/cgraphunit.c
llvm-gcc-4.2/trunk/gcc/passes.c
llvm-gcc-4.2/trunk/gcc/tree-pass.h
Modified: llvm-gcc-4.2/trunk/gcc/cgraphunit.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/cgraphunit.c?rev=61826&r1=61825&r2=61826&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/cgraphunit.c (original)
+++ llvm-gcc-4.2/trunk/gcc/cgraphunit.c Tue Jan 6 16:26:39 2009
@@ -1595,6 +1595,8 @@
return false;
}
+/* LLVM LOCAL begin */
+#ifndef ENABLE_LLVM
static void
ipa_passes (void)
{
@@ -1604,6 +1606,8 @@
execute_ipa_pass_list (all_ipa_passes);
bitmap_obstack_release (NULL);
}
+#endif
+/* LLVM LOCAL end */
/* Perform simple optimizations based on callgraph. */
@@ -1641,9 +1645,13 @@
dump_cgraph (cgraph_dump_file);
}
+ /* LLVM LOCAL begin */
+#ifndef ENABLE_LLVM
/* Don't run the IPA passes if there was any error or sorry messages. */
if (errorcount == 0 && sorrycount == 0)
ipa_passes ();
+#endif
+ /* LLVM LOCAL end */
/* This pass remove bodies of extern inline functions we never inlined.
Do this later so other IPA passes see what is really going on. */
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=61826&r1=61825&r2=61826&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/passes.c (original)
+++ llvm-gcc-4.2/trunk/gcc/passes.c Tue Jan 6 16:26:39 2009
@@ -333,10 +333,11 @@
/* The root of the compilation pass tree, once constructed. */
-struct tree_opt_pass *all_passes, *all_ipa_passes, *all_lowering_passes;
/* LLVM LOCAL begin */
#ifdef ENABLE_LLVM
-struct tree_opt_pass *all_extra_lowering_passes;
+struct tree_opt_pass *all_lowering_passes, *all_extra_lowering_passes;
+#else
+struct tree_opt_pass *all_passes, *all_ipa_passes, *all_lowering_passes;
#endif
/* LLVM LOCAL end */
@@ -479,21 +480,21 @@
struct tree_opt_pass **p;
#define NEXT_PASS(PASS) (p = next_pass_1 (p, &PASS))
+ /* LLVM LOCAL begin */
+#ifndef ENABLE_LLVM
/* 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);
NEXT_PASS (pass_ipa_inline);
NEXT_PASS (pass_ipa_reference);
- NEXT_PASS (pass_ipa_pure_const);
+ NEXT_PASS (pass_ipa_pure_const);
NEXT_PASS (pass_ipa_type_escape);
NEXT_PASS (pass_ipa_pta);
-#endif
- /* LLVM local end */
*p = NULL;
+#endif
+ /* LLVM LOCAL end */
/* All passes needed to lower the function into shape optimizers can
operate on. */
@@ -524,6 +525,7 @@
NEXT_PASS (pass_fixup_cfg);
NEXT_PASS (pass_init_datastructures);
NEXT_PASS (pass_expand_omp);
+ NEXT_PASS (pass_fold_builtins);
NEXT_PASS (pass_free_datastructures);
*p = NULL;
#endif
@@ -610,13 +612,7 @@
NEXT_PASS (pass_object_sizes);
NEXT_PASS (pass_store_ccp);
NEXT_PASS (pass_store_copy_prop);
-
-#endif
- /* LLVM LOCAL end */
NEXT_PASS (pass_fold_builtins);
- /* LLVM LOCAL begin */
-#ifndef ENABLE_LLVM
-
/* FIXME: May alias should a TODO but for 4.0.0,
we add may_alias right after fold builtins
which can create arbitrary GIMPLE. */
@@ -768,14 +764,18 @@
NEXT_PASS (pass_final);
*p = NULL;
#endif
- /* LLVM local end */
+ /* LLVM LOCAL end */
#undef NEXT_PASS
/* Register the passes with the tree dump code. */
+ /* LLVM LOCAL begin */
+#ifndef ENABLE_LLVM
register_dump_files (all_ipa_passes, true,
PROP_gimple_any | PROP_gimple_lcf | PROP_gimple_leh
| PROP_cfg);
+#endif
+ /* LLVM LOCAL end */
register_dump_files (all_lowering_passes, false, PROP_gimple_any);
/* LLVM LOCAL begin */
#ifdef ENABLE_LLVM
Modified: llvm-gcc-4.2/trunk/gcc/tree-pass.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/tree-pass.h?rev=61826&r1=61825&r2=61826&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/tree-pass.h (original)
+++ llvm-gcc-4.2/trunk/gcc/tree-pass.h Tue Jan 6 16:26:39 2009
@@ -399,10 +399,11 @@
extern struct tree_opt_pass pass_rtl_seqabstr;
/* The root of the compilation pass tree, once constructed. */
-extern struct tree_opt_pass *all_passes, *all_ipa_passes, *all_lowering_passes;
/* LLVM LOCAL begin */
#ifdef ENABLE_LLVM
-extern struct tree_opt_pass *all_extra_lowering_passes;
+extern struct tree_opt_pass *all_lowering_passes, *all_extra_lowering_passes;
+#else
+extern struct tree_opt_pass *all_passes, *all_ipa_passes, *all_lowering_passes;
#endif
/* LLVM LOCAL end */
More information about the llvm-commits
mailing list