This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Make sra_modify_assign's stmt prameter gimple (as opposed to gimple *)
- From: Martin Jambor <mjambor at suse dot cz>
- To: Sebastian Pop <sebpop at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 30 Jul 2014 11:46:22 +0200
- Subject: Re: [PATCH] Make sra_modify_assign's stmt prameter gimple (as opposed to gimple *)
- Authentication-results: sourceware.org; auth=none
- References: <20140725165059 dot GA14543 at virgil dot suse> <CAFk3UF-iAYBAW3e84N2DG+WmCBa4yCj8dkdpsmk+LAaX8F_7pw at mail dot gmail dot com>
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 --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;