From: Easwaran Raman <eraman@google.com>
To: gcc-patches@gcc.gnu.org
Cc: Richard Guenther <richard.guenther@gmail.com>
Subject: Mark variables addressable if they are copied using libcall in RTL expander
Date: Tue, 21 Jun 2011 02:15:00 -0000 [thread overview]
Message-ID: <BANLkTi=gb-G47LAP8uQkiXqLz=dJE047Oy6-N3F8Dfef_NU=6Q@mail.gmail.com> (raw)
This fixes bugs introduced by r175063. OK for trunk if there are no
test regressions?
-Easwaran
2011-06-20 Easwaran Raman <eraman@google.com>
PR rtl-optimization/49429
* expr.c (emit_block_move_hints): Mark MEM_EXPR(x) and
MEM_EXPR(y) addressable if emit_block_move_via_libcall is
used to copy y into x.
Index: gcc/expr.c
===================================================================
--- gcc/expr.c (revision 175081)
+++ gcc/expr.c (working copy)
@@ -1181,8 +1181,19 @@ emit_block_move_hints (rtx x, rtx y, rtx size, enu
else if (may_use_call
&& ADDR_SPACE_GENERIC_P (MEM_ADDR_SPACE (x))
&& ADDR_SPACE_GENERIC_P (MEM_ADDR_SPACE (y)))
- retval = emit_block_move_via_libcall (x, y, size,
- method == BLOCK_OP_TAILCALL);
+ {
+ /* Since x and y are passed to a libcall, mark the corresponding
+ tree EXPR as addressable. */
+ tree y_expr = MEM_EXPR (y);
+ tree x_expr = MEM_EXPR (x);
+ if (y_expr)
+ mark_addressable (y_expr);
+ if (x_expr)
+ mark_addressable (x_expr);
+ retval = emit_block_move_via_libcall (x, y, size,
+ method == BLOCK_OP_TAILCALL);
+ }
+
else
emit_block_move_via_loop (x, y, size, align);
next reply other threads:[~2011-06-21 1:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-06-21 2:15 Easwaran Raman [this message]
2011-06-21 9:02 ` Richard Guenther
2011-06-22 13:15 ` Eric Botcazou
2011-06-22 13:53 ` Jakub Jelinek
2011-06-22 13:54 ` Richard Guenther
2011-06-22 14:26 ` Eric Botcazou
2011-06-22 19:39 ` Easwaran Raman
2011-06-23 10:00 ` Eric Botcazou
2011-06-23 10:32 ` Richard Guenther
2011-06-23 11:07 ` Eric Botcazou
2011-06-23 19:16 ` Easwaran Raman
2011-06-23 19:32 ` Jakub Jelinek
2011-06-23 21:56 ` Easwaran Raman
2011-06-24 9:00 ` Richard Guenther
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='BANLkTi=gb-G47LAP8uQkiXqLz=dJE047Oy6-N3F8Dfef_NU=6Q@mail.gmail.com' \
--to=eraman@google.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=richard.guenther@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).