diff options
author | Mark Mitchell <mark@codesourcery.com> | 1999-11-04 07:23:58 +0000 |
---|---|---|
committer | Mark Mitchell <mmitchel@gcc.gnu.org> | 1999-11-04 07:23:58 +0000 |
commit | 673b5311a91950bfb2d484fc057411ae00bd5e09 (patch) | |
tree | 1464717adfe230dd1a7f3efcf6143c8d9d949e03 /gcc/emit-rtl.c | |
parent | d211953910b71e341ccec849e4ade98db792369e (diff) | |
download | gcc-673b5311a91950bfb2d484fc057411ae00bd5e09.zip gcc-673b5311a91950bfb2d484fc057411ae00bd5e09.tar.gz gcc-673b5311a91950bfb2d484fc057411ae00bd5e09.tar.bz2 |
flags.h (flag_renumber_insns): Declare.
* flags.h (flag_renumber_insns): Declare.
* emit-rtl.c (renumber_insns): Check flag_renumber_insns. Print
renumbering table.
* rtl.h (renumber_insns): Change prototype.
* toplev.c (flag_renumber_insns): Define.
(rest_of_compilation): Pass rtl_dump_file to flag_renumber_insns.
From-SVN: r30388
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r-- | gcc/emit-rtl.c | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index fed65a6..16fe0bc 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -1898,21 +1898,33 @@ get_max_uid () return cur_insn_uid; } +/* Renumber instructions so that no instruction UIDs are wasted. */ + void -renumber_insns () +renumber_insns (stream) + FILE *stream; { rtx insn; int old_max_uid = cur_insn_uid; + /* If we're not supposed to renumber instructions, don't. */ + if (!flag_renumber_insns) + return; + /* If there aren't that many instructions, then it's not really worth renumbering them. */ - if (get_max_uid () < 25000) + if (flag_renumber_insns == 1 && get_max_uid () < 25000) return; cur_insn_uid = 1; for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) - INSN_UID (insn) = cur_insn_uid++; + { + if (stream) + fprintf (stream, "Renumbering insn %d to %d\n", + INSN_UID (insn), cur_insn_uid); + INSN_UID (insn) = cur_insn_uid++; + } } /* Return the next insn. If it is a SEQUENCE, return the first insn @@ -2593,7 +2605,6 @@ remove_unncessary_notes () { rtx insn; rtx next; - varray_type block_stack; /* Remove NOTE_INSN_DELETED notes. We must not remove the first instruction in the function because the compiler depends on the |