diff options
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/jump.c | 20 |
2 files changed, 25 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8d6c406354d..6715f30cb7a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2012-05-16 David S. Miller <davem@davemloft.net> + + * jump.c (delete_related_insns): If we remove a CALL, make sure + we delete it's NOTE_INSN_CALL_ARG_LOCATION note too. + 2012-05-16 Bill Schmidt <wschmidt@linux.vnet.ibm.com> PR tree-optimization/53217 diff --git a/gcc/jump.c b/gcc/jump.c index 246fab02ff3..f5f644999d6 100644 --- a/gcc/jump.c +++ b/gcc/jump.c @@ -1252,6 +1252,26 @@ delete_related_insns (rtx insn) if (next != 0 && BARRIER_P (next)) delete_insn (next); + /* If this is a call, then we have to remove the var tracking note + for the call arguments. */ + + if (CALL_P (insn) + || (NONJUMP_INSN_P (insn) + && GET_CODE (PATTERN (insn)) == SEQUENCE + && CALL_P (XVECEXP (PATTERN (insn), 0, 0)))) + { + rtx p = insn; + + for (p = NEXT_INSN (p); + p && NOTE_P (p); + p = NEXT_INSN (p)) + if (NOTE_KIND (p) == NOTE_INSN_CALL_ARG_LOCATION) + { + remove_insn (p); + break; + } + } + /* If deleting a jump, decrement the count of the label, and delete the label if it is now unused. */ |