This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[COMMITTED] Update rs6000.c's pass_analyze_swaps to use rtx_insn [was Re: [PATCH 029/236] rtl_data.x_parm_birth_insn is an insn]


On Wed, 2014-08-13 at 11:13 -0600, Jeff Law wrote:
> On 08/13/14 11:08, David Malcolm wrote:
> > On Wed, 2014-08-13 at 07:44 -0600, Jeff Law wrote:
> >> On 08/06/14 11:20, David Malcolm wrote:
> >>> gcc/
> >>> 	* function.h (struct rtl_data): Strengthen field
> >>> 	"x_parm_birth_insn" from rtx to rtx_insn *.
> >>> 	* function.c (struct assign_parm_data_all): Strengthen fields
> >>> 	"first_conversion_insn" and "last_conversion_insn" from rtx to
> >>> 	rtx_insn *.
> >> OK.  I think at this point any patch which merely changes the type of
> >> some variable or in a signature from rtx to rtx_insn (or any of the
> >> concrete passes) is considered trivial enough to go forward without
> >             ^^^^^^
> > Presumably you meant "subclasses" here, right?
> yes.
> 
> >
> >> explicit review.
> >>
> >> That applies to patches in this series, additions you may need to make
> >> due to changes in the tree since you last rebased and further
> >> strengthening you or anyone else may want to tackle.

[...snip...]

Based on the above pre-approval, I went ahead and committed the
following patch to trunk as r214489 (bootstrapped on
powerpc64-unknown-linux-gnu: Fedora 20, gcc110, in fact)

Commit r214254 (aka 1b66c2db6a7d0a64fa2c33f083483d16fd864172) added a
new pass_analyze_swaps to rs6000 (aka ppc).

The following trivial patch updates it to use rtx_insn, needed before
the params to df_insn_rescan and df_insn_delete can be tightened up from
rtx to rtx_insn * in patch #191 (fwiw, trunk is currently at #171, i.e.
early in phase 4).

gcc/
	* config/rs6000/rs6000.c (class swap_web_entry): Strengthen field
	"insn" from rtx to rtx_insn *.
	(permute_load): Likewise for param "insn".
	(permute_store): Likewise.
	(handle_special_swappables): Likewise for local "insn".
	(replace_swap_with_copy): Likewise for locals "insn" and
	"new_insn".
	(rs6000_analyze_swaps): Likewise for local "insn".

Index: gcc/ChangeLog
===================================================================
--- gcc/ChangeLog	(revision 214488)
+++ gcc/ChangeLog	(revision 214489)
@@ -1,3 +1,14 @@
+2014-08-26  David Malcolm  <dmalcolm@redhat.com>
+
+	* config/rs6000/rs6000.c (class swap_web_entry): Strengthen field
+	"insn" from rtx to rtx_insn *.
+	(permute_load): Likewise for param "insn".
+	(permute_store): Likewise.
+	(handle_special_swappables): Likewise for local "insn".
+	(replace_swap_with_copy): Likewise for locals "insn" and
+	"new_insn".
+	(rs6000_analyze_swaps): Likewise for local "insn".
+
 2014-08-25  David Malcolm  <dmalcolm@redhat.com>
 
 	* regrename.h (struct du_chain): Strengthen field "insn" from rtx
Index: gcc/config/rs6000/rs6000.c
===================================================================
--- gcc/config/rs6000/rs6000.c	(revision 214488)
+++ gcc/config/rs6000/rs6000.c	(revision 214489)
@@ -33496,7 +33496,7 @@
 {
  public:
   /* Pointer to the insn.  */
-  rtx insn;
+  rtx_insn *insn;
   /* Set if insn contains a mention of a vector register.  All other
      fields are undefined if this field is unset.  */
   unsigned int is_relevant : 1;
@@ -34040,7 +34040,7 @@
 
 /* Convert the non-permuting load INSN to a permuting one.  */
 static void
-permute_load (rtx insn)
+permute_load (rtx_insn *insn)
 {
   rtx body = PATTERN (insn);
   rtx mem_op = SET_SRC (body);
@@ -34066,7 +34066,7 @@
 
 /* Convert the non-permuting store INSN to a permuting one.  */
 static void
-permute_store (rtx insn)
+permute_store (rtx_insn *insn)
 {
   rtx body = PATTERN (insn);
   rtx src_reg = SET_SRC (body);
@@ -34094,7 +34094,7 @@
 static void
 handle_special_swappables (swap_web_entry *insn_entry, unsigned i)
 {
-  rtx insn = insn_entry[i].insn;
+  rtx_insn *insn = insn_entry[i].insn;
   rtx body = PATTERN (insn);
 
   switch (insn_entry[i].special_handling)
@@ -34133,11 +34133,11 @@
 static void
 replace_swap_with_copy (swap_web_entry *insn_entry, unsigned i)
 {
-  rtx insn = insn_entry[i].insn;
+  rtx_insn *insn = insn_entry[i].insn;
   rtx body = PATTERN (insn);
   rtx src_reg = XEXP (SET_SRC (body), 0);
   rtx copy = gen_rtx_SET (VOIDmode, SET_DEST (body), src_reg);
-  rtx new_insn = emit_insn_before (copy, insn);
+  rtx_insn *new_insn = emit_insn_before (copy, insn);
   set_block_for_insn (new_insn, BLOCK_FOR_INSN (insn));
   df_insn_rescan (new_insn);
 
@@ -34209,7 +34209,7 @@
 {
   swap_web_entry *insn_entry;
   basic_block bb;
-  rtx insn;
+  rtx_insn *insn;
 
   /* Dataflow analysis for use-def chains.  */
   df_set_flags (DF_RD_PRUNE_DEAD_DEFS);

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]