diff options
| author | drow <drow@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-01-17 22:14:17 +0000 |
|---|---|---|
| committer | drow <drow@138bc75d-0d04-0410-961f-82ee72b054a4> | 2004-01-17 22:14:17 +0000 |
| commit | ca154f3f2209edd618242c8605fcbeddbfa5231f (patch) | |
| tree | 26fe26b671e75ed353a65429f329946b27e76929 | |
| parent | e69efecb72b8d04781f939b2dabb071b17b6cb61 (diff) | |
| download | ppe42-gcc-ca154f3f2209edd618242c8605fcbeddbfa5231f.tar.gz ppe42-gcc-ca154f3f2209edd618242c8605fcbeddbfa5231f.zip | |
* rtl.h (emit_insn_before_sameloc, emit_jump_insn_before_sameloc)
(emit_call_insn_before_sameloc, emit_insn_after_sameloc)
(emit_jump_insn_after_sameloc, emit_call_insn_after_sameloc): New
macros.
* reload1.c (emit_reload_insns): Use them.
* emit-rtl.c (emit_insn_before_sameloc, emit_insn_after_sameloc)
(emit_jump_insn_after_sameloc, emit_call_insn_after_sameloc): Check
for NULL PATTERN.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@76062 138bc75d-0d04-0410-961f-82ee72b054a4
| -rw-r--r-- | gcc/ChangeLog | 11 | ||||
| -rw-r--r-- | gcc/emit-rtl.c | 12 | ||||
| -rw-r--r-- | gcc/reload1.c | 24 | ||||
| -rw-r--r-- | gcc/rtl.h | 13 |
4 files changed, 48 insertions, 12 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index a40dc42d511..3f71bd5fd00 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,16 @@ 2004-01-17 Daniel Jacobowitz <drow@mvista.com> + * rtl.h (emit_insn_before_sameloc, emit_jump_insn_before_sameloc) + (emit_call_insn_before_sameloc, emit_insn_after_sameloc) + (emit_jump_insn_after_sameloc, emit_call_insn_after_sameloc): New + macros. + * reload1.c (emit_reload_insns): Use them. + * emit-rtl.c (emit_insn_before_sameloc, emit_insn_after_sameloc) + (emit_jump_insn_after_sameloc, emit_call_insn_after_sameloc): Check + for NULL PATTERN. + +2004-01-17 Daniel Jacobowitz <drow@mvista.com> + * final.c (SEEN_BB, SEEN_NOTE, SEEN_EMITTED): Define. (final_scan_insn): Update to take an additional SEEN argument. Emit a line note after the prologue. Make static. diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index ddc84ee8895..a77b9d1e0e9 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -4383,6 +4383,9 @@ emit_insn_after_setloc (rtx pattern, rtx after, int loc) { rtx last = emit_insn_after (pattern, after); + if (pattern == NULL_RTX) + return last; + after = NEXT_INSN (after); while (1) { @@ -4401,6 +4404,9 @@ emit_jump_insn_after_setloc (rtx pattern, rtx after, int loc) { rtx last = emit_jump_insn_after (pattern, after); + if (pattern == NULL_RTX) + return last; + after = NEXT_INSN (after); while (1) { @@ -4419,6 +4425,9 @@ emit_call_insn_after_setloc (rtx pattern, rtx after, int loc) { rtx last = emit_call_insn_after (pattern, after); + if (pattern == NULL_RTX) + return last; + after = NEXT_INSN (after); while (1) { @@ -4438,6 +4447,9 @@ emit_insn_before_setloc (rtx pattern, rtx before, int loc) rtx first = PREV_INSN (before); rtx last = emit_insn_before (pattern, before); + if (pattern == NULL_RTX) + return last; + first = NEXT_INSN (first); while (1) { diff --git a/gcc/reload1.c b/gcc/reload1.c index 9a0ad894746..1df667e8f88 100644 --- a/gcc/reload1.c +++ b/gcc/reload1.c @@ -1,6 +1,6 @@ /* Reload pseudo regs into hard regs for insns that require hard regs. Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, - 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. This file is part of GCC. @@ -6963,25 +6963,25 @@ emit_reload_insns (struct insn_chain *chain) reloads for the operand. The RELOAD_OTHER output reloads are output in descending order by reload number. */ - emit_insn_before (other_input_address_reload_insns, insn); - emit_insn_before (other_input_reload_insns, insn); + emit_insn_before_sameloc (other_input_address_reload_insns, insn); + emit_insn_before_sameloc (other_input_reload_insns, insn); for (j = 0; j < reload_n_operands; j++) { - emit_insn_before (inpaddr_address_reload_insns[j], insn); - emit_insn_before (input_address_reload_insns[j], insn); - emit_insn_before (input_reload_insns[j], insn); + emit_insn_before_sameloc (inpaddr_address_reload_insns[j], insn); + emit_insn_before_sameloc (input_address_reload_insns[j], insn); + emit_insn_before_sameloc (input_reload_insns[j], insn); } - emit_insn_before (other_operand_reload_insns, insn); - emit_insn_before (operand_reload_insns, insn); + emit_insn_before_sameloc (other_operand_reload_insns, insn); + emit_insn_before_sameloc (operand_reload_insns, insn); for (j = 0; j < reload_n_operands; j++) { - rtx x = emit_insn_after (outaddr_address_reload_insns[j], insn); - x = emit_insn_after (output_address_reload_insns[j], x); - x = emit_insn_after (output_reload_insns[j], x); - emit_insn_after (other_output_reload_insns[j], x); + rtx x = emit_insn_after_sameloc (outaddr_address_reload_insns[j], insn); + x = emit_insn_after_sameloc (output_address_reload_insns[j], x); + x = emit_insn_after_sameloc (output_reload_insns[j], x); + emit_insn_after_sameloc (other_output_reload_insns[j], x); } /* For all the spill regs newly reloaded in this instruction, diff --git a/gcc/rtl.h b/gcc/rtl.h index cd7b2aeac81..fbd8eca337f 100644 --- a/gcc/rtl.h +++ b/gcc/rtl.h @@ -1573,6 +1573,19 @@ extern rtx next_label (rtx); extern rtx next_cc0_user (rtx); extern rtx prev_cc0_setter (rtx); +#define emit_insn_before_sameloc(INSN, BEFORE) \ + emit_insn_before_setloc (INSN, BEFORE, INSN_LOCATOR (BEFORE)) +#define emit_jump_insn_before_sameloc(INSN, BEFORE) \ + emit_jump_insn_before_setloc (INSN, BEFORE, INSN_LOCATOR (BEFORE)) +#define emit_call_insn_before_sameloc(INSN, BEFORE) \ + emit_call_insn_before_setloc (INSN, BEFORE, INSN_LOCATOR (BEFORE)) +#define emit_insn_after_sameloc(INSN, AFTER) \ + emit_insn_after_setloc (INSN, AFTER, INSN_LOCATOR (AFTER)) +#define emit_jump_insn_after_sameloc(INSN, AFTER) \ + emit_jump_insn_after_setloc (INSN, AFTER, INSN_LOCATOR (AFTER)) +#define emit_call_insn_after_sameloc(INSN, AFTER) \ + emit_call_insn_after_setloc (INSN, AFTER, INSN_LOCATOR (AFTER)) + /* In cfglayout.c */ extern tree choose_inner_scope (tree, tree); extern int insn_line (rtx); |

