aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Henderson <rth@redhat.com>2012-12-13 11:31:06 -0800
committerRichard Henderson <rth@gcc.gnu.org>2012-12-13 11:31:06 -0800
commite1df04775d6d0c3f905b9e77e371be04a035e50e (patch)
tree04ed25dd8b335d7527e49186bde8e93d1e09061f /gcc
parent3deafb32c699170d9822e3c50aa1e339ee7705ea (diff)
downloadgcc-e1df04775d6d0c3f905b9e77e371be04a035e50e.zip
gcc-e1df04775d6d0c3f905b9e77e371be04a035e50e.tar.gz
gcc-e1df04775d6d0c3f905b9e77e371be04a035e50e.tar.bz2
alpha: Consider barriers when placing nops after sibcalls
* config/alpha/alpha.c (alpha_pad_function_end): Consider barriers when looking for NOTE_INSN_CALL_ARG_LOCATION. From-SVN: r194484
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/alpha/alpha.c21
2 files changed, 17 insertions, 9 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 825694e..9f1af89 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2012-12-13 Richard Henderson <rth@redhat.com>
+
+ * config/alpha/alpha.c (alpha_pad_function_end): Consider barriers
+ when looking for NOTE_INSN_CALL_ARG_LOCATION.
+
2012-12-13 Richard Biener <rguenther@suse.de>
PR middle-end/53476
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index 82135ff..8411218 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -9253,23 +9253,26 @@ alpha_pad_function_end (void)
for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
{
- if (! (CALL_P (insn)
- && (SIBLING_CALL_P (insn)
- || find_reg_note (insn, REG_NORETURN, NULL_RTX))))
+ if (!CALL_P (insn)
+ || !(SIBLING_CALL_P (insn)
+ || find_reg_note (insn, REG_NORETURN, NULL_RTX)))
continue;
/* Make sure we do not split a call and its corresponding
CALL_ARG_LOCATION note. */
- if (CALL_P (insn))
+ next = NEXT_INSN (insn);
+ if (next == NULL)
+ continue;
+ if (BARRIER_P (next))
{
- next = NEXT_INSN (insn);
- if (next && NOTE_P (next)
- && NOTE_KIND (next) == NOTE_INSN_CALL_ARG_LOCATION)
- insn = next;
+ next = NEXT_INSN (next);
+ if (next == NULL)
+ continue;
}
+ if (NOTE_P (next) && NOTE_KIND (next) == NOTE_INSN_CALL_ARG_LOCATION)
+ insn = next;
next = next_active_insn (insn);
-
if (next)
{
rtx pat = PATTERN (next);