diff mbox series

Fix continue condition in IPA-SRA's process_scan_results

Message ID ri6r2444fzd.fsf@suse.cz
State New
Headers show
Series Fix continue condition in IPA-SRA's process_scan_results | expand

Commit Message

Martin Jambor Sept. 25, 2019, 2:17 p.m. UTC
Hi,

On Tue, Sep 24 2019, Martin Jambor wrote:
>
>
> It is the correct thing to do, sorry for the breakage.  I have to run
> now but will prepare a patch tomorrow.
>

and here it is.  The patch fixes the thinko explained in my email
yesterday - basically the test for locally_unused was intended for
unused aggregates which have however not been marked as such yet and
going this way for unsplitable but unused register-type parameters may
cause problems in some cases, if they are for example big SVE vectors.

Passed bootstrap and testing on x86_64-linux.  OK for trunk?

Thanks,

Martin


2019-09-25  Martin Jambor  <mjambor@suse.cz>

	* ipa-sra.c (process_scan_results): Fix continue condition.
---
 gcc/ipa-sra.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Richard Biener Sept. 26, 2019, 7:33 a.m. UTC | #1
On Wed, Sep 25, 2019 at 4:18 PM Martin Jambor <mjambor@suse.cz> wrote:
>
> Hi,
>
> On Tue, Sep 24 2019, Martin Jambor wrote:
> >
> >
> > It is the correct thing to do, sorry for the breakage.  I have to run
> > now but will prepare a patch tomorrow.
> >
>
> and here it is.  The patch fixes the thinko explained in my email
> yesterday - basically the test for locally_unused was intended for
> unused aggregates which have however not been marked as such yet and
> going this way for unsplitable but unused register-type parameters may
> cause problems in some cases, if they are for example big SVE vectors.
>
> Passed bootstrap and testing on x86_64-linux.  OK for trunk?

OK.

Richard.

> Thanks,
>
> Martin
>
>
> 2019-09-25  Martin Jambor  <mjambor@suse.cz>
>
>         * ipa-sra.c (process_scan_results): Fix continue condition.
> ---
>  gcc/ipa-sra.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gcc/ipa-sra.c b/gcc/ipa-sra.c
> index 0ccebbd4607..b35fff69472 100644
> --- a/gcc/ipa-sra.c
> +++ b/gcc/ipa-sra.c
> @@ -2239,7 +2239,7 @@ process_scan_results (cgraph_node *node, struct function *fun,
>         desc_index++, parm = DECL_CHAIN (parm))
>      {
>        gensum_param_desc *desc = &(*param_descriptions)[desc_index];
> -      if (!desc->locally_unused && !desc->split_candidate)
> +      if (!desc->split_candidate)
>         continue;
>
>        if (flag_checking)
> --
> 2.23.0
>
diff mbox series

Patch

diff --git a/gcc/ipa-sra.c b/gcc/ipa-sra.c
index 0ccebbd4607..b35fff69472 100644
--- a/gcc/ipa-sra.c
+++ b/gcc/ipa-sra.c
@@ -2239,7 +2239,7 @@  process_scan_results (cgraph_node *node, struct function *fun,
        desc_index++, parm = DECL_CHAIN (parm))
     {
       gensum_param_desc *desc = &(*param_descriptions)[desc_index];
-      if (!desc->locally_unused && !desc->split_candidate)
+      if (!desc->split_candidate)
 	continue;
 
       if (flag_checking)