summaryrefslogtreecommitdiff
path: root/gcc/ipa-pure-const.c
diff options
context:
space:
mode:
authorsteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2012-09-13 13:41:46 +0000
committersteven <steven@138bc75d-0d04-0410-961f-82ee72b054a4>2012-09-13 13:41:46 +0000
commit9631926aec638559834b9a7691094052f3f76cf0 (patch)
treeccf42e9cc160d21ec43421b4abfe25c8a1812cda /gcc/ipa-pure-const.c
parent024fee2c369096e6fe6cde620243df5843893004 (diff)
downloadgcc-9631926aec638559834b9a7691094052f3f76cf0.tar.gz
* ipa-pure-const.c (state_from_flags, local_pure_const): Use
current_function_name instead of lang_hooks.decl_printable_name. * function.h (fndecl_name): New prototype. * function.c (fndecl_name): New function. * vecir.h (cgraph_node_p): New standard IR VEC type. * trans-mem.c (cgraph_node_p): No need anymore to define it here. * ipa-utils.h (ipa_get_nodes_in_cycle): New prototype. * ipa-utils.c (ipa_get_nodes_in_cycle): New function. * ipa-reference.c: Don't include langhooks.h, and certainly not twice. Fix many formatting issues (long lines, short lines, spacing, etc.). (get_static_name): Use fndecl_name. (dump_static_vars_set_to_file): New function split out from propagate. (union_static_var_sets): New function, union two sets and collapse to all_module_statics as quickly as possible. (intersect_static_var_sets): New function, similar to above. (copy_static_var_set): Renamed from copy_global_bitmap and rewritten to allocate a copy on the same bitmap_obstack as the source set. (propagate_bits): Simplify, and clarify by using union_static_var_sets. (generate_summary): Remove bm_temp. Print UID of promotable globals. (read_write_all_from_decl): Use pass-by-reference, bless C++. (get_read_write_all_from_node): New function, split out from propagate. (propagate): Simplify and clarify with helper functions. Use ipa_get_nodes_in_cycle to walk all nodes in a reduced node. (ipa_reference_read_optimization_summary): Use fndecl_name instead of lang_hooks.decl_printable_name. * rtl.h (print_rtl_single_with_indent): New prototype. * print-rtl.c (print_rtl_single_with_indent): New function. * cfghooks.h (empty_block_p, split_block_before_cond_jump): New hooks. * cfghooks.c (empty_block_p, split_block_before_cond_jump): Implement. * cfgrtl.c (rtl_block_empty_p, rtl_split_block_before_cond_jump): Implement RTL specific hooks. (rtl_cfg_hooks, cfg_layout_rtl_cfg_hooks): Register the new hooks. * tree-cfg.c (gimple_empty_block_p, gimple_split_block_before_cond_jump): Implement GIMPLE specific hooks. (gimple_cfg_hooks): Register the new hooks. * tree-ssa-phiopt.c (empty_block_p): Remove in favor of new hook. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@191255 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ipa-pure-const.c')
-rw-r--r--gcc/ipa-pure-const.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c
index b6810a89bcb..6bdd4d14bdf 100644
--- a/gcc/ipa-pure-const.c
+++ b/gcc/ipa-pure-const.c
@@ -192,6 +192,7 @@ warn_function_noreturn (tree decl)
= suggest_attribute (OPT_Wsuggest_attribute_noreturn, decl,
true, warned_about, "noreturn");
}
+
/* Init the function state. */
static void
@@ -387,7 +388,7 @@ state_from_flags (enum pure_const_state_e *state, bool *looping,
else
{
if (dump_file && (dump_flags & TDF_DETAILS))
- fprintf (dump_file, " neihter\n");
+ fprintf (dump_file, " neither\n");
*state = IPA_NEITHER;
*looping = true;
}
@@ -1573,7 +1574,7 @@ local_pure_const (void)
warn_function_noreturn (cfun->decl);
if (dump_file)
fprintf (dump_file, "Function found to be noreturn: %s\n",
- lang_hooks.decl_printable_name (current_function_decl, 2));
+ current_function_name ());
/* Update declaration and reduce profile to executed once. */
TREE_THIS_VOLATILE (current_function_decl) = 1;
@@ -1597,8 +1598,7 @@ local_pure_const (void)
if (dump_file)
fprintf (dump_file, "Function found to be %sconst: %s\n",
l->looping ? "looping " : "",
- lang_hooks.decl_printable_name (current_function_decl,
- 2));
+ current_function_name ());
}
else if (DECL_LOOPING_CONST_OR_PURE_P (current_function_decl)
&& !l->looping)
@@ -1610,8 +1610,7 @@ local_pure_const (void)
}
if (dump_file)
fprintf (dump_file, "Function found to be non-looping: %s\n",
- lang_hooks.decl_printable_name (current_function_decl,
- 2));
+ current_function_name ());
}
break;
@@ -1627,8 +1626,7 @@ local_pure_const (void)
if (dump_file)
fprintf (dump_file, "Function found to be %spure: %s\n",
l->looping ? "looping " : "",
- lang_hooks.decl_printable_name (current_function_decl,
- 2));
+ current_function_name ());
}
else if (DECL_LOOPING_CONST_OR_PURE_P (current_function_decl)
&& !l->looping)
@@ -1640,8 +1638,7 @@ local_pure_const (void)
}
if (dump_file)
fprintf (dump_file, "Function found to be non-looping: %s\n",
- lang_hooks.decl_printable_name (current_function_decl,
- 2));
+ current_function_name ());
}
break;
@@ -1654,8 +1651,7 @@ local_pure_const (void)
changed = true;
if (dump_file)
fprintf (dump_file, "Function found to be nothrow: %s\n",
- lang_hooks.decl_printable_name (current_function_decl,
- 2));
+ current_function_name ());
}
free (l);
if (changed)