Commit e4f36d31 by Jeff Law Committed by Jeff Law

ira-conflicts.c (print_allocno_conflicts): New function broken out from...

	* ira-conflicts.c (print_allocno_conflicts): New function broken out
	from...
	(print_conflicts): Call print_allocno_conflicts.

From-SVN: r159368
parent 1fcebc11
2010-05-13 Jeff Law <law@redhat.com>
* ira-conflicts.c (print_allocno_conflicts): New function broken out
from...
(print_conflicts): Call print_allocno_conflicts.
2010-05-13 Jakub Jelinek <jakub@redhat.com> 2010-05-13 Jakub Jelinek <jakub@redhat.com>
PR debug/44104 PR debug/44104
......
...@@ -684,68 +684,72 @@ print_hard_reg_set (FILE *file, const char *title, HARD_REG_SET set) ...@@ -684,68 +684,72 @@ print_hard_reg_set (FILE *file, const char *title, HARD_REG_SET set)
putc ('\n', file); putc ('\n', file);
} }
/* Print information about allocno or only regno (if REG_P) conflicts
to FILE. */
static void static void
print_conflicts (FILE *file, bool reg_p) print_allocno_conflicts (FILE * file, bool reg_p, ira_allocno_t a)
{ {
ira_allocno_t a;
ira_allocno_iterator ai;
HARD_REG_SET conflicting_hard_regs; HARD_REG_SET conflicting_hard_regs;
ira_allocno_t conflict_a;
ira_allocno_conflict_iterator aci;
basic_block bb;
FOR_EACH_ALLOCNO (a, ai) if (reg_p)
fprintf (file, ";; r%d", ALLOCNO_REGNO (a));
else
{ {
ira_allocno_t conflict_a; fprintf (file, ";; a%d(r%d,", ALLOCNO_NUM (a), ALLOCNO_REGNO (a));
ira_allocno_conflict_iterator aci; if ((bb = ALLOCNO_LOOP_TREE_NODE (a)->bb) != NULL)
basic_block bb; fprintf (file, "b%d", bb->index);
if (reg_p)
fprintf (file, ";; r%d", ALLOCNO_REGNO (a));
else else
{ fprintf (file, "l%d", ALLOCNO_LOOP_TREE_NODE (a)->loop->num);
fprintf (file, ";; a%d(r%d,", ALLOCNO_NUM (a), ALLOCNO_REGNO (a)); putc (')', file);
if ((bb = ALLOCNO_LOOP_TREE_NODE (a)->bb) != NULL) }
fprintf (file, "b%d", bb->index); fputs (" conflicts:", file);
else if (ALLOCNO_CONFLICT_ALLOCNO_ARRAY (a) != NULL)
fprintf (file, "l%d", ALLOCNO_LOOP_TREE_NODE (a)->loop->num); FOR_EACH_ALLOCNO_CONFLICT (a, conflict_a, aci)
putc (')', file); {
} if (reg_p)
fputs (" conflicts:", file); fprintf (file, " r%d,", ALLOCNO_REGNO (conflict_a));
if (ALLOCNO_CONFLICT_ALLOCNO_ARRAY (a) != NULL) else
FOR_EACH_ALLOCNO_CONFLICT (a, conflict_a, aci) {
{ fprintf (file, " a%d(r%d,", ALLOCNO_NUM (conflict_a),
if (reg_p) ALLOCNO_REGNO (conflict_a));
fprintf (file, " r%d,", ALLOCNO_REGNO (conflict_a)); if ((bb = ALLOCNO_LOOP_TREE_NODE (conflict_a)->bb) != NULL)
fprintf (file, "b%d)", bb->index);
else else
{ fprintf (file, "l%d)",
fprintf (file, " a%d(r%d,", ALLOCNO_NUM (conflict_a), ALLOCNO_LOOP_TREE_NODE (conflict_a)->loop->num);
ALLOCNO_REGNO (conflict_a));
if ((bb = ALLOCNO_LOOP_TREE_NODE (conflict_a)->bb) != NULL)
fprintf (file, "b%d)", bb->index);
else
fprintf (file, "l%d)",
ALLOCNO_LOOP_TREE_NODE (conflict_a)->loop->num);
}
} }
COPY_HARD_REG_SET (conflicting_hard_regs, }
ALLOCNO_TOTAL_CONFLICT_HARD_REGS (a)); COPY_HARD_REG_SET (conflicting_hard_regs,
AND_COMPL_HARD_REG_SET (conflicting_hard_regs, ira_no_alloc_regs); ALLOCNO_TOTAL_CONFLICT_HARD_REGS (a));
AND_HARD_REG_SET (conflicting_hard_regs, AND_COMPL_HARD_REG_SET (conflicting_hard_regs, ira_no_alloc_regs);
reg_class_contents[ALLOCNO_COVER_CLASS (a)]); AND_HARD_REG_SET (conflicting_hard_regs,
print_hard_reg_set (file, "\n;; total conflict hard regs:", reg_class_contents[ALLOCNO_COVER_CLASS (a)]);
conflicting_hard_regs); print_hard_reg_set (file, "\n;; total conflict hard regs:",
COPY_HARD_REG_SET (conflicting_hard_regs, conflicting_hard_regs);
ALLOCNO_CONFLICT_HARD_REGS (a)); COPY_HARD_REG_SET (conflicting_hard_regs,
AND_COMPL_HARD_REG_SET (conflicting_hard_regs, ira_no_alloc_regs); ALLOCNO_CONFLICT_HARD_REGS (a));
AND_HARD_REG_SET (conflicting_hard_regs, AND_COMPL_HARD_REG_SET (conflicting_hard_regs, ira_no_alloc_regs);
reg_class_contents[ALLOCNO_COVER_CLASS (a)]); AND_HARD_REG_SET (conflicting_hard_regs,
print_hard_reg_set (file, ";; conflict hard regs:", reg_class_contents[ALLOCNO_COVER_CLASS (a)]);
conflicting_hard_regs); print_hard_reg_set (file, ";; conflict hard regs:",
} conflicting_hard_regs);
putc ('\n', file); putc ('\n', file);
} }
/* Print information about allocno or only regno (if REG_P) conflicts /* Print information about allocno or only regno (if REG_P) conflicts
to FILE. */
static void
print_conflicts (FILE *file, bool reg_p)
{
ira_allocno_t a;
ira_allocno_iterator ai;
FOR_EACH_ALLOCNO (a, ai)
print_allocno_conflicts (file, reg_p, a);
}
/* Print information about allocno or only regno (if REG_P) conflicts
to stderr. */ to stderr. */
void void
ira_debug_conflicts (bool reg_p) ira_debug_conflicts (bool reg_p)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment