[llvm-commits] [llvm-gcc-4.2] r63857 - in /llvm-gcc-4.2/branches/Apple/Dib/gcc: cgraphunit.c ipa-inline.c passes.c tree-pass.h
Evan Cheng
evan.cheng at apple.com
Thu Feb 5 01:04:16 PST 2009
Author: evancheng
Date: Thu Feb 5 03:04:15 2009
New Revision: 63857
URL: http://llvm.org/viewvc/llvm-project?rev=63857&view=rev
Log:
Restore gcc inliner in teh Dib branch for now. It's exposing some performance issues.
Modified:
llvm-gcc-4.2/branches/Apple/Dib/gcc/cgraphunit.c
llvm-gcc-4.2/branches/Apple/Dib/gcc/ipa-inline.c
llvm-gcc-4.2/branches/Apple/Dib/gcc/passes.c
llvm-gcc-4.2/branches/Apple/Dib/gcc/tree-pass.h
Modified: llvm-gcc-4.2/branches/Apple/Dib/gcc/cgraphunit.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Dib/gcc/cgraphunit.c?rev=63857&r1=63856&r2=63857&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Dib/gcc/cgraphunit.c (original)
+++ llvm-gcc-4.2/branches/Apple/Dib/gcc/cgraphunit.c Thu Feb 5 03:04:15 2009
@@ -1600,8 +1600,6 @@
return false;
}
-/* LLVM LOCAL begin */
-#ifndef ENABLE_LLVM
static void
ipa_passes (void)
{
@@ -1611,8 +1609,6 @@
execute_ipa_pass_list (all_ipa_passes);
bitmap_obstack_release (NULL);
}
-#endif
-/* LLVM LOCAL end */
/* Perform simple optimizations based on callgraph. */
@@ -1650,13 +1646,9 @@
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/branches/Apple/Dib/gcc/ipa-inline.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Dib/gcc/ipa-inline.c?rev=63857&r1=63856&r2=63857&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Dib/gcc/ipa-inline.c (original)
+++ llvm-gcc-4.2/branches/Apple/Dib/gcc/ipa-inline.c Thu Feb 5 03:04:15 2009
@@ -942,7 +942,11 @@
/* 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);
@@ -1029,9 +1033,19 @@
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)
{
@@ -1150,6 +1164,11 @@
}
/* 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/branches/Apple/Dib/gcc/passes.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Dib/gcc/passes.c?rev=63857&r1=63856&r2=63857&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Dib/gcc/passes.c (original)
+++ llvm-gcc-4.2/branches/Apple/Dib/gcc/passes.c Thu Feb 5 03:04:15 2009
@@ -333,11 +333,10 @@
/* 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_lowering_passes, *all_extra_lowering_passes;
-#else
-struct tree_opt_pass *all_passes, *all_ipa_passes, *all_lowering_passes;
+struct tree_opt_pass *all_extra_lowering_passes;
#endif
/* LLVM LOCAL end */
@@ -480,21 +479,23 @@
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 */
+#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);
+#endif
+ NEXT_PASS (pass_ipa_inline); /* LLVM: inline functions marked always_inline */
+#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);
- *p = NULL;
#endif
- /* LLVM LOCAL end */
+ /* LLVM local end */
+ *p = NULL;
/* All passes needed to lower the function into shape optimizers can
operate on. */
@@ -764,18 +765,14 @@
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
@@ -853,7 +850,6 @@
dump_file, dump_flags);
else
{
-/* LLVM LOCAL begin */
#ifndef ENABLE_LLVM
if (dump_flags & TDF_SLIM)
print_rtl_slim_with_bb (dump_file, get_insns (), dump_flags);
@@ -862,7 +858,6 @@
else
print_rtl (dump_file, get_insns ());
#endif
-/* LLVM LOCAL end */
if (curr_properties & PROP_cfg
&& graph_dump_format != no_graph
&& (dump_flags & TDF_GRAPH))
Modified: llvm-gcc-4.2/branches/Apple/Dib/gcc/tree-pass.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/branches/Apple/Dib/gcc/tree-pass.h?rev=63857&r1=63856&r2=63857&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Dib/gcc/tree-pass.h (original)
+++ llvm-gcc-4.2/branches/Apple/Dib/gcc/tree-pass.h Thu Feb 5 03:04:15 2009
@@ -399,11 +399,10 @@
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_lowering_passes, *all_extra_lowering_passes;
-#else
-extern struct tree_opt_pass *all_passes, *all_ipa_passes, *all_lowering_passes;
+extern struct tree_opt_pass *all_extra_lowering_passes;
#endif
/* LLVM LOCAL end */
More information about the llvm-commits
mailing list