diff options
author | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-09 17:52:20 +0000 |
---|---|---|
committer | steven <steven@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-09 17:52:20 +0000 |
commit | 0a227ed5edeaf150b5ae49ffabc8f9583f6c301a (patch) | |
tree | 6ca937bbe1996a99e17b469a90f86c5b560f1d05 /gcc/calls.c | |
parent | 59312820e49658a8bf1f74d96fc59c14f6a8c564 (diff) | |
download | gcc-0a227ed5edeaf150b5ae49ffabc8f9583f6c301a.tar.gz |
* calls.c (purge_reg_equiv_notes): Remove, fold into...
(fixup_tail_calls): ...here. Only look at insns between the
start of the function and the FUNCTION_BEG insn note.
* gcse.c (one_cprop_pass): Fix typos in dumps.
* tree-ssa-operands.h (FOR_EACH_PHI_ARG): Fix typos.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99461 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/calls.c')
-rw-r--r-- | gcc/calls.c | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/gcc/calls.c b/gcc/calls.c index b26e87308a1..3c4cbf8949a 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -1766,30 +1766,6 @@ shift_return_value (enum machine_mode mode, bool left_p, rtx value) return true; } -/* Remove all REG_EQUIV notes found in the insn chain. */ - -static void -purge_reg_equiv_notes (void) -{ - rtx insn; - - for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) - { - while (1) - { - rtx note = find_reg_note (insn, REG_EQUIV, 0); - if (note) - { - /* Remove the note and keep looking at the notes for - this insn. */ - remove_note (insn, note); - continue; - } - break; - } - } -} - /* Generate all the code for a function call and return an rtx for its value. Store the value in TARGET (specified as an rtx) if convenient. @@ -3050,16 +3026,40 @@ expand_call (tree exp, rtx target, int ignore) this function's incoming arguments. At the start of RTL generation we know the only REG_EQUIV notes - in the rtl chain are those for incoming arguments, so we can safely - flush any REG_EQUIV note. + in the rtl chain are those for incoming arguments, so we can look + for REG_EQUIV notes between the start of the function and the + NOTE_INSN_FUNCTION_BEG. This is (slight) overkill. We could keep track of the highest argument we clobber and be more selective in removing notes, but it does not seem to be worth the effort. */ + void fixup_tail_calls (void) { - purge_reg_equiv_notes (); + rtx insn; + + for (insn = get_insns (); insn; insn = NEXT_INSN (insn)) + { + /* There are never REG_EQUIV notes for the incoming arguments + after the NOTE_INSN_FUNCTION_BEG note, so stop if we see it. */ + if (NOTE_P (insn) + && NOTE_LINE_NUMBER (insn) == NOTE_INSN_FUNCTION_BEG) + break; + + while (1) + { + rtx note = find_reg_note (insn, REG_EQUIV, 0); + if (note) + { + /* Remove the note and keep looking at the notes for + this insn. */ + remove_note (insn, note); + continue; + } + break; + } + } } /* Traverse an argument list in VALUES and expand all complex |