[llvm-commits] [llvm-gcc-4.2] r64824 - in /llvm-gcc-4.2/branches/Apple/Dib/gcc: cgraphunit.c ipa-inline.c passes.c tree-pass.h
Bill Wendling
isanbard at gmail.com
Tue Feb 17 14:03:51 PST 2009
Author: void
Date: Tue Feb 17 16:03:51 2009
New Revision: 64824
URL: http://llvm.org/viewvc/llvm-project?rev=64824&view=rev
Log:
--- Reverse-merging (from foreign repository) r63857 into '.':
U gcc/tree-pass.h
U gcc/cgraphunit.c
U gcc/ipa-inline.c
U gcc/passes.c
Re-disable GCC inliner from Dib.
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=64824&r1=64823&r2=64824&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Dib/gcc/cgraphunit.c (original)
+++ llvm-gcc-4.2/branches/Apple/Dib/gcc/cgraphunit.c Tue Feb 17 16:03:51 2009
@@ -1600,6 +1600,8 @@
return false;
}
+/* LLVM LOCAL begin */
+#ifndef ENABLE_LLVM
static void
ipa_passes (void)
{
@@ -1609,6 +1611,8 @@
execute_ipa_pass_list (all_ipa_passes);
bitmap_obstack_release (NULL);
}
+#endif
+/* LLVM LOCAL end */
/* Perform simple optimizations based on callgraph. */
@@ -1646,9 +1650,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/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=64824&r1=64823&r2=64824&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 Tue Feb 17 16:03:51 2009
@@ -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)
{
@@ -1164,11 +1150,6 @@
}
/* 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=64824&r1=64823&r2=64824&view=diff
==============================================================================
--- llvm-gcc-4.2/branches/Apple/Dib/gcc/passes.c (original)
+++ llvm-gcc-4.2/branches/Apple/Dib/gcc/passes.c Tue Feb 17 16:03:51 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,23 +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 */
-#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);
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. */
@@ -765,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
@@ -850,6 +853,7 @@
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);
@@ -858,6 +862,7 @@
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=64824&r1=64823&r2=64824&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 Tue Feb 17 16:03:51 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