mcf.c: Do not include tm.h, tree.h, and langhooks.h.

* mcf.c: Do not include tm.h, tree.h, and langhooks.h.
	(dump_fixup_graph): Use current_function_name.
	(adjust_cfg_counts): Likewise.
	* ira-conflicts.c: Do not include tree.h.
	(ira_build_conflicts): Use REG_USERVAR_P instead of DECL_ARTIFICIAL.

From-SVN: r189361
This commit is contained in:
Steven Bosscher 2012-07-08 18:13:19 +00:00
parent cab4c5107f
commit e6d46b5a8f
3 changed files with 13 additions and 16 deletions

View File

@ -1,3 +1,11 @@
2012-07-08 Steven Bosscher <steven@gcc.gnu.org>
* mcf.c: Do not include tm.h, tree.h, and langhooks.h.
(dump_fixup_graph): Use current_function_name.
(adjust_cfg_counts): Likewise.
* ira-conflicts.c: Do not include tree.h.
(ira_build_conflicts): Use REG_USERVAR_P instead of DECL_ARTIFICIAL.
2012-07-08 Oleg Endo <olegendo@gcc.gnu.org> 2012-07-08 Oleg Endo <olegendo@gcc.gnu.org>
PR target/51244 PR target/51244

View File

@ -25,7 +25,6 @@ along with GCC; see the file COPYING3. If not see
#include "tm.h" #include "tm.h"
#include "regs.h" #include "regs.h"
#include "rtl.h" #include "rtl.h"
#include "tree.h" /* For DECL_ARTIFICIAL and friends. */
#include "tm_p.h" #include "tm_p.h"
#include "target.h" #include "target.h"
#include "flags.h" #include "flags.h"
@ -893,17 +892,12 @@ ira_build_conflicts (void)
for (i = 0; i < n; i++) for (i = 0; i < n; i++)
{ {
ira_object_t obj = ALLOCNO_OBJECT (a, i); ira_object_t obj = ALLOCNO_OBJECT (a, i);
reg_attrs *attrs = REG_ATTRS (regno_reg_rtx [ALLOCNO_REGNO (a)]); rtx allocno_reg = regno_reg_rtx [ALLOCNO_REGNO (a)];
tree decl;
if ((! flag_caller_saves && ALLOCNO_CALLS_CROSSED_NUM (a) != 0) if ((! flag_caller_saves && ALLOCNO_CALLS_CROSSED_NUM (a) != 0)
/* For debugging purposes don't put user defined variables in /* For debugging purposes don't put user defined variables in
callee-clobbered registers. */ callee-clobbered registers. */
|| (optimize == 0 || (optimize == 0 && REG_USERVAR_P (allocno_reg)))
&& attrs != NULL
&& (decl = attrs->decl) != NULL
&& VAR_OR_FUNCTION_DECL_P (decl)
&& ! DECL_ARTIFICIAL (decl)))
{ {
IOR_HARD_REG_SET (OBJECT_TOTAL_CONFLICT_HARD_REGS (obj), IOR_HARD_REG_SET (OBJECT_TOTAL_CONFLICT_HARD_REGS (obj),
call_used_reg_set); call_used_reg_set);

View File

@ -46,13 +46,8 @@ along with GCC; see the file COPYING3. If not see
#include "config.h" #include "config.h"
#include "system.h" #include "system.h"
#include "coretypes.h" #include "coretypes.h"
#include "tm.h"
#include "basic-block.h" #include "basic-block.h"
#include "tree.h" /* FIXME: Only for langhooks.h. */
#include "langhooks.h"
#include "tree.h"
#include "gcov-io.h" #include "gcov-io.h"
#include "profile.h" #include "profile.h"
/* CAP_INFINITY: Constant to represent infinite capacity. */ /* CAP_INFINITY: Constant to represent infinite capacity. */
@ -290,7 +285,7 @@ dump_fixup_graph (FILE *file, fixup_graph_type *fixup_graph, const char *msg)
fnum_edges = fixup_graph->num_edges; fnum_edges = fixup_graph->num_edges;
fprintf (file, "\nDump fixup graph for %s(): %s.\n", fprintf (file, "\nDump fixup graph for %s(): %s.\n",
lang_hooks.decl_printable_name (current_function_decl, 2), msg); current_function_name (), msg);
fprintf (file, fprintf (file,
"There are %d vertices and %d edges. new_exit_index is %d.\n\n", "There are %d vertices and %d edges. new_exit_index is %d.\n\n",
fnum_vertices, fnum_edges, fixup_graph->new_exit_index); fnum_vertices, fnum_edges, fixup_graph->new_exit_index);
@ -1280,8 +1275,8 @@ adjust_cfg_counts (fixup_graph_type *fixup_graph)
if (dump_file) if (dump_file)
{ {
fprintf (dump_file, "\nCheck %s() CFG flow conservation:\n", fprintf (dump_file, "\nCheck %s() CFG flow conservation:\n",
lang_hooks.decl_printable_name (current_function_decl, 2)); current_function_name ());
FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR->next_bb, EXIT_BLOCK_PTR, next_bb) FOR_EACH_BB (bb)
{ {
if ((bb->count != sum_edge_counts (bb->preds)) if ((bb->count != sum_edge_counts (bb->preds))
|| (bb->count != sum_edge_counts (bb->succs))) || (bb->count != sum_edge_counts (bb->succs)))