summaryrefslogtreecommitdiff
path: root/gcc/ira-build.c
diff options
context:
space:
mode:
authorvmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>2008-09-04 23:35:03 +0000
committervmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>2008-09-04 23:35:03 +0000
commit55c858c57495a6bd4d444faafa91dd07268e432e (patch)
treebdecaa024ed96b5a8c8718f2822578302345a9d7 /gcc/ira-build.c
parent11d2345d61941c6c038a4606c34278dc20d49c6f (diff)
downloadgcc-55c858c57495a6bd4d444faafa91dd07268e432e.tar.gz
2008-09-04 Vladimir Makarov <vmakarov@redhat.com>
* ira-conflicts.c (process_regs_for_copy): Check insn to check that the cost is already taken into account in ira-costs.c * ira-int.h (ira_debug_copy, ira_debug_copies): New. * ira-build.c (print_copy, print_copies, ira_debug_copy, ira_debug_copies): New. (ira_bulid): Call print_copies. * doc/tm.texi (IRA_COVER_CLASSES): Fix the description. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140014 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ira-build.c')
-rw-r--r--gcc/ira-build.c36
1 files changed, 36 insertions, 0 deletions
diff --git a/gcc/ira-build.c b/gcc/ira-build.c
index 6bd49c0cd1b..b1f496c41df 100644
--- a/gcc/ira-build.c
+++ b/gcc/ira-build.c
@@ -1097,6 +1097,40 @@ ira_add_allocno_copy (ira_allocno_t first, ira_allocno_t second, int freq,
return cp;
}
+/* Print info about copy CP into file F. */
+static void
+print_copy (FILE *f, ira_copy_t cp)
+{
+ fprintf (f, " cp%d:a%d(r%d)<->a%d(r%d)@%d\n", cp->num,
+ ALLOCNO_NUM (cp->first), ALLOCNO_REGNO (cp->first),
+ ALLOCNO_NUM (cp->second), ALLOCNO_REGNO (cp->second), cp->freq);
+}
+
+/* Print info about copy CP into stderr. */
+void
+ira_debug_copy (ira_copy_t cp)
+{
+ print_copy (stderr, cp);
+}
+
+/* Print info about all copies into file F. */
+static void
+print_copies (FILE *f)
+{
+ ira_copy_t cp;
+ ira_copy_iterator ci;
+
+ FOR_EACH_COPY (cp, ci)
+ print_copy (f, cp);
+}
+
+/* Print info about all copies into stderr. */
+void
+ira_debug_copies (void)
+{
+ print_copies (stderr);
+}
+
/* Print info about copies involving allocno A into file F. */
static void
print_allocno_copies (FILE *f, ira_allocno_t a)
@@ -2409,6 +2443,8 @@ ira_build (bool loops_p)
sort_conflict_id_allocno_map ();
setup_min_max_conflict_allocno_ids ();
ira_build_conflicts ();
+ if (internal_flag_ira_verbose > 2 && ira_dump_file != NULL)
+ print_copies (ira_dump_file);
if (internal_flag_ira_verbose > 0 && ira_dump_file != NULL)
{
int n, nr;