public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: tbsaunde+gcc@tbsaunde.org
To: gcc-patches@gcc.gnu.org
Subject: [PATCH 13/13] make emit_partition_copy return a rtx_insn *
Date: Sat, 02 May 2015 21:02:00 -0000	[thread overview]
Message-ID: <1430600503-14069-14-git-send-email-tbsaunde+gcc@tbsaunde.org> (raw)
In-Reply-To: <1430600503-14069-1-git-send-email-tbsaunde+gcc@tbsaunde.org>

From: Trevor Saunders <tbsaunde+gcc@tbsaunde.org>

gcc/ChangeLog:

2015-05-02  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>

	* tree-outof-ssa.c (emit_partition_copy): Return rtx_insn *.
	(insert_partition_copy_on_edge): Adjust.
	(insert_rtx_to_part_on_edge): Likewise.
	(insert_part_to_rtx_on_edge): Likewise.
---
 gcc/ChangeLog        |  7 +++++++
 gcc/tree-outof-ssa.c | 31 +++++++++++++------------------
 2 files changed, 20 insertions(+), 18 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ea48607..56d9d5d 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,12 @@
 2015-05-02  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
 
+	* tree-outof-ssa.c (emit_partition_copy): Return rtx_insn *.
+	(insert_partition_copy_on_edge): Adjust.
+	(insert_rtx_to_part_on_edge): Likewise.
+	(insert_part_to_rtx_on_edge): Likewise.
+
+2015-05-02  Trevor Saunders  <tbsaunde+gcc@tbsaunde.org>
+
 	* function.c (set_return_jump_label): Change type of argument to
 	rtx_insn *.
 	* function.h (set_return_jump_label): Adjust.
diff --git a/gcc/tree-outof-ssa.c b/gcc/tree-outof-ssa.c
index e6310cd..e23bc0b 100644
--- a/gcc/tree-outof-ssa.c
+++ b/gcc/tree-outof-ssa.c
@@ -242,11 +242,9 @@ set_location_for_edge (edge e)
    SRC/DEST might be BLKmode memory locations SIZEEXP is a tree from
    which we deduce the size to copy in that case.  */
 
-static inline rtx
+static inline rtx_insn *
 emit_partition_copy (rtx dest, rtx src, int unsignedsrcp, tree sizeexp)
 {
-  rtx seq;
-
   start_sequence ();
 
   if (GET_MODE (src) != VOIDmode && GET_MODE (src) != GET_MODE (dest))
@@ -259,7 +257,7 @@ emit_partition_copy (rtx dest, rtx src, int unsignedsrcp, tree sizeexp)
   else
     emit_move_insn (dest, src);
 
-  seq = get_insns ();
+  rtx_insn *seq = get_insns ();
   end_sequence ();
 
   return seq;
@@ -271,7 +269,6 @@ static void
 insert_partition_copy_on_edge (edge e, int dest, int src, source_location locus)
 {
   tree var;
-  rtx seq;
   if (dump_file && (dump_flags & TDF_DETAILS))
     {
       fprintf (dump_file,
@@ -291,10 +288,10 @@ insert_partition_copy_on_edge (edge e, int dest, int src, source_location locus)
     set_curr_insn_location (locus);
 
   var = partition_to_var (SA.map, src);
-  seq = emit_partition_copy (copy_rtx (SA.partition_to_pseudo[dest]),
-			     copy_rtx (SA.partition_to_pseudo[src]),
-			     TYPE_UNSIGNED (TREE_TYPE (var)),
-			     var);
+  rtx_insn *seq = emit_partition_copy (copy_rtx (SA.partition_to_pseudo[dest]),
+				       copy_rtx (SA.partition_to_pseudo[src]),
+				       TYPE_UNSIGNED (TREE_TYPE (var)),
+				       var);
 
   insert_insn_on_edge (seq, e);
 }
@@ -365,7 +362,6 @@ static void
 insert_rtx_to_part_on_edge (edge e, int dest, rtx src, int unsignedsrcp,
 			    source_location locus)
 {
-  rtx seq;
   if (dump_file && (dump_flags & TDF_DETAILS))
     {
       fprintf (dump_file,
@@ -387,9 +383,9 @@ insert_rtx_to_part_on_edge (edge e, int dest, rtx src, int unsignedsrcp,
      mems.  Usually we give the source.  As we result from SSA names
      the left and right size should be the same (and no WITH_SIZE_EXPR
      involved), so it doesn't matter.  */
-  seq = emit_partition_copy (copy_rtx (SA.partition_to_pseudo[dest]),
-			     src, unsignedsrcp,
-			     partition_to_var (SA.map, dest));
+  rtx_insn *seq = emit_partition_copy (copy_rtx (SA.partition_to_pseudo[dest]),
+				       src, unsignedsrcp,
+				       partition_to_var (SA.map, dest));
 
   insert_insn_on_edge (seq, e);
 }
@@ -401,7 +397,6 @@ static void
 insert_part_to_rtx_on_edge (edge e, rtx dest, int src, source_location locus)
 {
   tree var;
-  rtx seq;
   if (dump_file && (dump_flags & TDF_DETAILS))
     {
       fprintf (dump_file,
@@ -420,10 +415,10 @@ insert_part_to_rtx_on_edge (edge e, rtx dest, int src, source_location locus)
     set_curr_insn_location (locus);
 
   var = partition_to_var (SA.map, src);
-  seq = emit_partition_copy (dest,
-			     copy_rtx (SA.partition_to_pseudo[src]),
-			     TYPE_UNSIGNED (TREE_TYPE (var)),
-			     var);
+  rtx_insn *seq = emit_partition_copy (dest,
+				       copy_rtx (SA.partition_to_pseudo[src]),
+				       TYPE_UNSIGNED (TREE_TYPE (var)),
+				       var);
 
   insert_insn_on_edge (seq, e);
 }
-- 
2.4.0

  parent reply	other threads:[~2015-05-02 21:02 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-02 21:02 [PATCH 00/13] further rtx_insn *ification tbsaunde+gcc
2015-05-02 21:02 ` [PATCH 05/13] kill_autoinc_value can take a rtx_insn * tbsaunde+gcc
2015-05-02 21:02 ` [PATCH 09/13] make validate_replace_src_group " tbsaunde+gcc
2015-05-02 21:02 ` [PATCH 10/13] make fp_setter_insn " tbsaunde+gcc
2015-05-02 21:02 ` tbsaunde+gcc [this message]
2015-05-02 21:02 ` [PATCH 03/13] add_cfi_insn can be " tbsaunde+gcc
2015-05-02 21:02 ` [PATCH 02/13] df_set_note can take " tbsaunde+gcc
2015-05-02 21:02 ` [PATCH 11/13] type reg_equiv_init as rtx_insn_list tbsaunde+gcc
2015-05-02 21:02 ` [PATCH 01/13] change local vars to rtx_insn * tbsaunde+gcc
2015-05-02 21:02 ` [PATCH 08/13] make several functions in the scheduler take " tbsaunde+gcc
2015-05-02 21:02 ` [PATCH 12/13] make set_return_jump_label take an " tbsaunde+gcc
2015-05-02 21:02 ` [PATCH 04/13] recog_data::insn can be a " tbsaunde+gcc
2015-05-02 21:02 ` [PATCH 07/13] make some functions in config/ take " tbsaunde+gcc
2015-05-02 21:02 ` [PATCH 06/13] make some functions in lra-constraints.c take " tbsaunde+gcc
2015-05-04 17:16 ` [PATCH 00/13] further rtx_insn *ification Jeff Law

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=1430600503-14069-14-git-send-email-tbsaunde+gcc@tbsaunde.org \
    --to=tbsaunde+gcc@tbsaunde.org \
    --cc=gcc-patches@gcc.gnu.org \
    /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).