summaryrefslogtreecommitdiff
path: root/gcc/ira-conflicts.c
diff options
context:
space:
mode:
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-13 14:46:29 +0000
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>2010-05-13 14:46:29 +0000
commitc32f7a5a7f691e8ce0877c6442fe22ae65448cec (patch)
treed639ecc05dac2aceaa0d49d0c1a67fc5626d3c2a /gcc/ira-conflicts.c
parenta101a346c24b49aaff7326443ce0ff99d4cc26a1 (diff)
downloadgcc-c32f7a5a7f691e8ce0877c6442fe22ae65448cec.tar.gz
* ira-conflicts.c (print_allocno_conflicts): New function broken out
from... (print_conflicts): Call print_allocno_conflicts. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@159368 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ira-conflicts.c')
-rw-r--r--gcc/ira-conflicts.c104
1 files changed, 54 insertions, 50 deletions
diff --git a/gcc/ira-conflicts.c b/gcc/ira-conflicts.c
index 58fa4ad0302..70100acbb7f 100644
--- a/gcc/ira-conflicts.c
+++ b/gcc/ira-conflicts.c
@@ -684,68 +684,72 @@ print_hard_reg_set (FILE *file, const char *title, HARD_REG_SET set)
putc ('\n', file);
}
-/* Print information about allocno or only regno (if REG_P) conflicts
- to FILE. */
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;
+ 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;
- ira_allocno_conflict_iterator aci;
- basic_block bb;
-
- if (reg_p)
- fprintf (file, ";; r%d", ALLOCNO_REGNO (a));
+ fprintf (file, ";; a%d(r%d,", ALLOCNO_NUM (a), ALLOCNO_REGNO (a));
+ if ((bb = ALLOCNO_LOOP_TREE_NODE (a)->bb) != NULL)
+ fprintf (file, "b%d", bb->index);
else
- {
- fprintf (file, ";; a%d(r%d,", ALLOCNO_NUM (a), ALLOCNO_REGNO (a));
- if ((bb = ALLOCNO_LOOP_TREE_NODE (a)->bb) != NULL)
- fprintf (file, "b%d", bb->index);
- else
- fprintf (file, "l%d", ALLOCNO_LOOP_TREE_NODE (a)->loop->num);
- putc (')', file);
- }
- fputs (" conflicts:", file);
- if (ALLOCNO_CONFLICT_ALLOCNO_ARRAY (a) != NULL)
- FOR_EACH_ALLOCNO_CONFLICT (a, conflict_a, aci)
- {
- if (reg_p)
- fprintf (file, " r%d,", ALLOCNO_REGNO (conflict_a));
+ fprintf (file, "l%d", ALLOCNO_LOOP_TREE_NODE (a)->loop->num);
+ putc (')', file);
+ }
+ fputs (" conflicts:", file);
+ if (ALLOCNO_CONFLICT_ALLOCNO_ARRAY (a) != NULL)
+ FOR_EACH_ALLOCNO_CONFLICT (a, conflict_a, aci)
+ {
+ if (reg_p)
+ fprintf (file, " r%d,", ALLOCNO_REGNO (conflict_a));
+ else
+ {
+ fprintf (file, " a%d(r%d,", ALLOCNO_NUM (conflict_a),
+ ALLOCNO_REGNO (conflict_a));
+ if ((bb = ALLOCNO_LOOP_TREE_NODE (conflict_a)->bb) != NULL)
+ fprintf (file, "b%d)", bb->index);
else
- {
- fprintf (file, " a%d(r%d,", ALLOCNO_NUM (conflict_a),
- 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);
- }
+ 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));
- AND_COMPL_HARD_REG_SET (conflicting_hard_regs, ira_no_alloc_regs);
- AND_HARD_REG_SET (conflicting_hard_regs,
- reg_class_contents[ALLOCNO_COVER_CLASS (a)]);
- print_hard_reg_set (file, "\n;; total conflict hard regs:",
- conflicting_hard_regs);
- COPY_HARD_REG_SET (conflicting_hard_regs,
- ALLOCNO_CONFLICT_HARD_REGS (a));
- AND_COMPL_HARD_REG_SET (conflicting_hard_regs, ira_no_alloc_regs);
- AND_HARD_REG_SET (conflicting_hard_regs,
- reg_class_contents[ALLOCNO_COVER_CLASS (a)]);
- print_hard_reg_set (file, ";; conflict hard regs:",
- conflicting_hard_regs);
- }
+ }
+ COPY_HARD_REG_SET (conflicting_hard_regs,
+ ALLOCNO_TOTAL_CONFLICT_HARD_REGS (a));
+ AND_COMPL_HARD_REG_SET (conflicting_hard_regs, ira_no_alloc_regs);
+ AND_HARD_REG_SET (conflicting_hard_regs,
+ reg_class_contents[ALLOCNO_COVER_CLASS (a)]);
+ print_hard_reg_set (file, "\n;; total conflict hard regs:",
+ conflicting_hard_regs);
+ COPY_HARD_REG_SET (conflicting_hard_regs,
+ ALLOCNO_CONFLICT_HARD_REGS (a));
+ AND_COMPL_HARD_REG_SET (conflicting_hard_regs, ira_no_alloc_regs);
+ AND_HARD_REG_SET (conflicting_hard_regs,
+ reg_class_contents[ALLOCNO_COVER_CLASS (a)]);
+ print_hard_reg_set (file, ";; conflict hard regs:",
+ conflicting_hard_regs);
putc ('\n', file);
}
/* 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. */
void
ira_debug_conflicts (bool reg_p)