public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Sebastian Pop <sebpop@gmail.com>
To: gcc-patches@gcc.gnu.org
Cc: gcc-graphite@googlegroups.com,	rguenther@suse.de
Subject: [PATCH 2/7] Call recompute_tree_invariant_for_addr_expr when replacing a constant in an ADDR_EXPR.
Date: Tue, 30 Nov 2010 16:06:00 -0000	[thread overview]
Message-ID: <1291128636-30240-3-git-send-email-sebpop@gmail.com> (raw)
In-Reply-To: <1291128636-30240-1-git-send-email-sebpop@gmail.com>

From: spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>

2010-11-22  Sebastian Pop  <sebastian.pop@amd.com>

	* sese.c (rename_uses): Call recompute_tree_invariant_for_addr_expr
	when replacing a constant in an ADDR_EXPR.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/graphite@167058 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/ChangeLog          |    5 +++++
 gcc/ChangeLog.graphite |    5 +++++
 gcc/sese.c             |   13 +++++++++++++
 3 files changed, 23 insertions(+), 0 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3d6de3f..a9e0ddb 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,10 @@
 2010-11-29  Sebastian Pop  <sebastian.pop@amd.com>
 
+	* sese.c (rename_uses): Call recompute_tree_invariant_for_addr_expr
+	when replacing a constant in an ADDR_EXPR.
+
+2010-11-29  Sebastian Pop  <sebastian.pop@amd.com>
+
 	* graphite-blocking.c (lst_do_strip_mine_loop): Extra parameter
 	for the stride.
 	(lst_do_strip_mine): Same.
diff --git a/gcc/ChangeLog.graphite b/gcc/ChangeLog.graphite
index a205928..1746711 100644
--- a/gcc/ChangeLog.graphite
+++ b/gcc/ChangeLog.graphite
@@ -1,3 +1,8 @@
+2010-11-22  Sebastian Pop  <sebastian.pop@amd.com>
+
+	* sese.c (rename_uses): Call recompute_tree_invariant_for_addr_expr
+	when replacing a constant in an ADDR_EXPR.
+
 2010-10-20  Sebastian Pop  <sebastian.pop@amd.com>
 
 	* graphite-blocking.c (lst_do_strip_mine_loop): Extra parameter
diff --git a/gcc/sese.c b/gcc/sese.c
index ffcb51c..dbb0cd7 100644
--- a/gcc/sese.c
+++ b/gcc/sese.c
@@ -547,6 +547,19 @@ rename_uses (gimple copy, htab_t rename_map, gimple_stmt_iterator *gsi_tgt,
 				       true, NULL_TREE);
       gsi_insert_seq_before (gsi_tgt, stmts, GSI_SAME_STMT);
       replace_exp (use_p, new_expr);
+
+
+      if (TREE_CODE (new_expr) == INTEGER_CST)
+	{
+	  tree lhs = gimple_assign_lhs (copy);
+	  tree rhs = gimple_assign_rhs1 (copy);
+
+	  if (TREE_CODE (lhs) == ADDR_EXPR)
+	    recompute_tree_invariant_for_addr_expr (lhs);
+	  if (TREE_CODE (rhs) == ADDR_EXPR)
+	    recompute_tree_invariant_for_addr_expr (rhs);
+	}
+
       set_rename (rename_map, old_name, new_expr);
     }
 }
-- 
1.7.1

  parent reply	other threads:[~2010-11-30 14:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-30 15:33 [PATCH 0/7] Fix PR45297 Sebastian Pop
2010-11-30 15:43 ` [PATCH 3/7] Do not rewrite out of SSA scalar dependences crossing the limits of the scop Sebastian Pop
2010-11-30 15:56 ` [PATCH 1/7] Add a stride parameter to scop_do_strip_mine Sebastian Pop
2010-11-30 16:05 ` [PATCH 6/7] Avoid the analysis of data references after the translation out of SSA Sebastian Pop
2010-11-30 16:06 ` Sebastian Pop [this message]
2010-11-30 16:06 ` [PATCH 4/7] Postpone the rewrite out of SSA to the end of the translation to polyhedral representation Sebastian Pop
2010-12-15  6:25   ` H.J. Lu
2010-12-15 20:36     ` H.J. Lu
2010-11-30 16:07 ` [PATCH 7/7] Fix unused warnings Sebastian Pop
2010-11-30 16:18 ` [PATCH 5/7] LHS cannot be an ADDR_EXPR Sebastian Pop
2010-12-01 12:05 ` [PATCH 0/7] Fix PR45297 Richard Guenther
2010-12-01 20:37 ` H.J. Lu

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=1291128636-30240-3-git-send-email-sebpop@gmail.com \
    --to=sebpop@gmail.com \
    --cc=gcc-graphite@googlegroups.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rguenther@suse.de \
    /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).