diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-03-28 07:20:43 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-03-28 07:20:43 +0000 |
commit | 955a1beb3a970de41ee2603fd09ca81324c70fa9 (patch) | |
tree | 75ed5e9b27905299243ca2f77ff55612392c6d4b | |
parent | 1df0049ed27b5db39717bc67c5aacd88e390ff6b (diff) | |
download | gcc-955a1beb3a970de41ee2603fd09ca81324c70fa9.tar.gz |
* integrate.c (copy_insn_list): Use returnjump_p.
(copy_insn_notes): Recurse for CALL_PLACEHOLDER.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40912 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/integrate.c | 58 |
2 files changed, 39 insertions, 22 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 44cdd0edc16..41d161910b9 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,8 @@ 2001-03-27 Richard Henderson <rth@redhat.com> + * integrate.c (copy_insn_list): Use returnjump_p. + (copy_insn_notes): Recurse for CALL_PLACEHOLDER. + * function.h (struct function): Move all boolean valued fields to single bit fields at the end of the struct. diff --git a/gcc/integrate.c b/gcc/integrate.c index 76104c06f39..bedfd149610 100644 --- a/gcc/integrate.c +++ b/gcc/integrate.c @@ -1391,9 +1391,7 @@ copy_insn_list (insns, map, static_chain_value) break; case JUMP_INSN: - if (GET_CODE (PATTERN (insn)) == RETURN - || (GET_CODE (PATTERN (insn)) == PARALLEL - && GET_CODE (XVECEXP (PATTERN (insn), 0, 0)) == RETURN)) + if (map->integrating && returnjump_p (insn)) { if (map->local_return_label == 0) map->local_return_label = gen_label_rtx (); @@ -1593,30 +1591,46 @@ copy_insn_notes (insns, map) rtx insns; struct inline_remap *map; { - rtx insn; + rtx insn, new_insn; map->const_age++; for (insn = insns; insn; insn = NEXT_INSN (insn)) - if (INSN_P (insn) - && map->insn_map[INSN_UID (insn)] - && REG_NOTES (insn)) - { - rtx next, note = copy_rtx_and_substitute (REG_NOTES (insn), map, 0); + { + if (! INSN_P (insn)) + continue; - /* We must also do subst_constants, in case one of our parameters - has const type and constant value. */ - subst_constants (¬e, NULL_RTX, map, 0); - apply_change_group (); - REG_NOTES (map->insn_map[INSN_UID (insn)]) = note; + new_insn = map->insn_map[INSN_UID (insn)]; + if (! new_insn) + continue; - /* Finally, delete any REG_LABEL notes from the chain. */ - for (; note; note = next) - { - next = XEXP (note, 1); - if (REG_NOTE_KIND (note) == REG_LABEL) - remove_note (map->insn_map[INSN_UID (insn)], note); - } - } + if (REG_NOTES (insn)) + { + rtx next, note = copy_rtx_and_substitute (REG_NOTES (insn), map, 0); + + /* We must also do subst_constants, in case one of our parameters + has const type and constant value. */ + subst_constants (¬e, NULL_RTX, map, 0); + apply_change_group (); + REG_NOTES (new_insn) = note; + + /* Delete any REG_LABEL notes from the chain. Remap any + REG_EH_REGION notes. */ + for (; note; note = next) + { + next = XEXP (note, 1); + if (REG_NOTE_KIND (note) == REG_LABEL) + remove_note (new_insn, note); + } + } + + if (GET_CODE (insn) == CALL_INSN + && GET_CODE (PATTERN (insn)) == CALL_PLACEHOLDER) + { + int i; + for (i = 0; i < 3; i++) + copy_insn_notes (XEXP (PATTERN (insn), i), map); + } + } } /* Given a chain of PARM_DECLs, ARGS, copy each decl into a VAR_DECL, |