From: Richard Biener <rguenther@suse.de>
To: Jan Hubicka <hubicka@kam.mff.cuni.cz>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: Use modref kills in tree-ssa-dse
Date: Tue, 16 Nov 2021 13:39:23 +0100 (CET) [thread overview]
Message-ID: <o6p01818-rnor-1q1p-2358-n5nn94ssn817@fhfr.qr> (raw)
In-Reply-To: <20211116123050.GJ71052@kam.mff.cuni.cz>
On Tue, 16 Nov 2021, Jan Hubicka wrote:
> >
> > Not sure, tree-ssa-dse.c doesn't seem to handle MEM_REF with offset?
> >
> > VN has adjust_offsets_for_equal_base_address for this purpose. I
> > agree that some common functionality like
> >
> > bool
> > get_relative_extent_of (const ao_ref *base, const ao_ref *ref,
> > poly_int64 *offset);
> >
> > that computes [offset, offset + ref->[max_]size] of REF adjusted as to
> > make ao_ref_base have the same address (or return false if not
> > possible). Then [ base->offset, base->offset + base->max_size ]
> > can be compared against that.
>
> OK, I will look into that.
> > > + if (valid_ao_ref_for_dse (write)
> > > + && operand_equal_p (write->base, ref->base, OEP_ADDRESS_OF)
> > > + && known_eq (write->size, write->max_size)
> > > + && normalize_ref (write, ref)
> >
> > normalize_ref alters 'write', I think we should work on a local
> > copy here. See live_bytes_read which takes a copy of 'use_ref'.
>
> We never proces same write twice (get_ao_ref is always constructing
> fresh copy), so this should be safe. Or shall I turn the write
> parameter to "ao_ref write" instead of "ao_ref *write" just to be sure
> we do not break infuture?
Yes.
Thanks,
Richard.
prev parent reply other threads:[~2021-11-16 12:39 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-14 23:23 Jan Hubicka
2021-11-16 12:06 ` Richard Biener
2021-11-16 12:30 ` Jan Hubicka
2021-11-16 12:39 ` Richard Biener [this message]
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=o6p01818-rnor-1q1p-2358-n5nn94ssn817@fhfr.qr \
--to=rguenther@suse.de \
--cc=gcc-patches@gcc.gnu.org \
--cc=hubicka@kam.mff.cuni.cz \
/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).