diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1996-05-17 08:54:54 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1996-05-17 08:54:54 -0400 |
commit | 1427d6d2bc4ee5e9b9527dc6177fd251781ce2cd (patch) | |
tree | a7537018d9ea1eb3b25deb180c925d39ae13bc18 | |
parent | fc94a55b9221b13ebe9ac1c01a096d18c5d92594 (diff) | |
download | gcc-1427d6d2bc4ee5e9b9527dc6177fd251781ce2cd.zip gcc-1427d6d2bc4ee5e9b9527dc6177fd251781ce2cd.tar.gz gcc-1427d6d2bc4ee5e9b9527dc6177fd251781ce2cd.tar.bz2 |
(insn_cuid): New function.
(INSN_CUID): Sometimes call it.
From-SVN: r11986
-rw-r--r-- | gcc/combine.c | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/gcc/combine.c b/gcc/combine.c index 05031d2..889e93e 100644 --- a/gcc/combine.c +++ b/gcc/combine.c @@ -140,9 +140,8 @@ static int max_uid_cuid; /* Get the cuid of an insn. */ -#define INSN_CUID(INSN) (INSN_UID (INSN) > max_uid_cuid \ - ? (abort(), 0) \ - : uid_cuid[INSN_UID (INSN)]) +#define INSN_CUID(INSN) \ +(INSN_UID (INSN) > max_uid_cuid ? insn_cuid (INSN) : uid_cuid[INSN_UID (INSN)]) /* Maximum register number, which is the size of the tables below. */ @@ -446,6 +445,7 @@ static int reg_bitfield_target_p PROTO((rtx, rtx)); static void distribute_notes PROTO((rtx, rtx, rtx, rtx, rtx, rtx)); static void distribute_links PROTO((rtx)); static void mark_used_regs_combine PROTO((rtx)); +static int insn_cuid PROTO((rtx)); /* Main entry point for combiner. F is the first insn of the function. NREGS is the first unused pseudo-reg number. */ @@ -11191,6 +11191,22 @@ distribute_links (links) } } +/* Compute INSN_CUID for INSN, which is an insn made by combine. */ + +static int +insn_cuid (insn) + rtx insn; +{ + while (insn != 0 && INSN_UID (insn) > max_uid_cuid + && GET_CODE (insn) == INSN && GET_CODE (PATTERN (insn)) == USE) + insn = NEXT_INSN (insn); + + if (INSN_UID (insn) > max_uid_cuid) + abort (); + + return INSN_CUID (insn); +} + void dump_combine_stats (file) FILE *file; |