diff mbox

Make sra_modify_assign's stmt prameter gimple (as opposed to gimple *)

Message ID 20140730094622.GD14543@virgil.suse
State New
Headers show

Commit Message

Martin Jambor July 30, 2014, 9:46 a.m. UTC
Hi,

On Fri, Jul 25, 2014 at 10:56:10AM -0700, Sebastian Pop wrote:
> On Fri, Jul 25, 2014 at 9:50 AM, Martin Jambor <mjambor@suse.cz> wrote:
> > Hi,
> >
> > parameter stmt of sra_modify_assign and sra_modify_constructor_assign
> > is currently gimple*, although there is no need for the extra level of
> > indirection and dereferencing.  Thus this patch removes quite few
> > stars and one ampersand.
> 
> Looks good to me.
> Can you please also remove the * from "gimple *stmt_ptr" in
> sra_ipa_modify_assign?
> 

Sure, I will commit the following as obvious later today, after a
round of bootstrap and testsuite finishes.

Thanks,

Martin

2014-07-29  Martin Jambor  <mjambor@suse.cz>

	* tree-sra.c (sra_ipa_modify_assign): Change type fo the first
	parameter to gimple.
diff mbox

Patch

diff --git a/gcc/tree-sra.c b/gcc/tree-sra.c
index d90f00a..340d072 100644
--- a/gcc/tree-sra.c
+++ b/gcc/tree-sra.c
@@ -4579,17 +4579,15 @@  replace_removed_params_ssa_names (gimple stmt,
   return true;
 }
 
-/* If the statement pointed to by STMT_PTR contains any expressions that need
-   to replaced with a different one as noted by ADJUSTMENTS, do so.  Handle any
-   potential type incompatibilities (GSI is used to accommodate conversion
-   statements and must point to the statement).  Return true iff the statement
-   was modified.  */
+/* If the statement STMT contains any expressions that need to replaced with a
+   different one as noted by ADJUSTMENTS, do so.  Handle any potential type
+   incompatibilities (GSI is used to accommodate conversion statements and must
+   point to the statement).  Return true iff the statement was modified.  */
 
 static bool
-sra_ipa_modify_assign (gimple *stmt_ptr, gimple_stmt_iterator *gsi,
+sra_ipa_modify_assign (gimple stmt, gimple_stmt_iterator *gsi,
 		       ipa_parm_adjustment_vec adjustments)
 {
-  gimple stmt = *stmt_ptr;
   tree *lhs_p, *rhs_p;
   bool any;
 
@@ -4676,7 +4674,7 @@  ipa_sra_modify_function_body (ipa_parm_adjustment_vec adjustments)
 	      break;
 
 	    case GIMPLE_ASSIGN:
-	      modified |= sra_ipa_modify_assign (&stmt, &gsi, adjustments);
+	      modified |= sra_ipa_modify_assign (stmt, &gsi, adjustments);
 	      modified |= replace_removed_params_ssa_names (stmt, adjustments);
 	      break;