public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Martin Jambor <mjambor@suse.cz>
To: Richard Biener <rguenther@suse.de>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] ipa/109607 - properly gimplify conversions introduced by IPA param manipulation
Date: Thu, 27 Apr 2023 11:49:23 +0200	[thread overview]
Message-ID: <ri6jzxxven0.fsf@suse.cz> (raw)
In-Reply-To: <notmuch-sha1-303b2e15d6e6379f358f76d79baab4438f9eddca>

Hi,

On Thu, Apr 27 2023, Richard Biener wrote:
> The following addresses IPA param manipulation (through IPA SRA)
> replacing
>
>   BIT_FIELD_REF <*this_8(D), 8, 56>
>
> with
>
>   BIT_FIELD_REF <VIEW_CONVERT_EXPR<const struct profile_count>(ISRA.814), 8, 56>
>
> which is supposed to be invalid GIMPLE (ISRA.814 is a register).
> There's currently insufficient checking in place to catch this in the
> IL verifier but I am working on that as part of fixing PR109594.
>
> The solution for the particular testcase I am running into this is
> to split the conversion to a separate stmt.  Generally the modification
> phase is set up for this but the extra_stmts sequence isn't passed
> around everywhere.  The following passes it to modify_expression
> from modify_assignment when rewriting the RHS.
>
> Bootstrapped and tested on x86_64-unknown-linux-gnu.
>
> OK for trunk?

Yes, thank you!

Martin


>
> Thanks,
> Richard.
>
> 	PR ipa/109607
> 	* ipa-param-manipulation.h
> 	(ipa_param_body_adjustments::modify_expression): Add extra_stmts
> 	argument.
> 	* ipa-param-manipulation.cc
> 	(ipa_param_body_adjustments::modify_expression): Likewise.
> 	When we need a conversion and the replacement is a register
> 	split the conversion out.
> 	(ipa_param_body_adjustments::modify_assignment): Pass
> 	extra_stmts to RHS modify_expression.
>
> 	* g++.dg/torture/pr109607.C: New testcase.

       reply	other threads:[~2023-04-27  9:49 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <notmuch-sha1-303b2e15d6e6379f358f76d79baab4438f9eddca>
2023-04-27  9:49 ` Martin Jambor [this message]
2023-04-27  7:24 Richard Biener

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=ri6jzxxven0.fsf@suse.cz \
    --to=mjambor@suse.cz \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rguenther@suse.de \
    /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).