public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Di Zhao OS <dizhao@os.amperecomputing.com>
To: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>
Cc: Richard Biener <richard.guenther@gmail.com>
Subject: PING^2: [PATCH v5] tree-optimization/101186 - extend FRE with "equivalence map" for condition prediction
Date: Wed, 7 Sep 2022 07:30:56 +0000	[thread overview]
Message-ID: <SN6PR01MB424035A279EFAC55BCCA41C8E8419@SN6PR01MB4240.prod.exchangelabs.com> (raw)

Gentle ping again.

Thanks,
Di Zhao

> -----Original Message-----
> From: Di Zhao OS
> Sent: Tuesday, July 12, 2022 2:08 AM
> To: 'gcc-patches@gcc.gnu.org' <gcc-patches@gcc.gnu.org>
> Cc: 'Richard Biener' <richard.guenther@gmail.com>
> Subject: PING: [PATCH v5] tree-optimization/101186 - extend FRE with
> "equivalence map" for condition prediction
> 
> Updated the patch in the attachment, so it can apply.
> 
> Thanks,
> Di Zhao
> 
> > -----Original Message-----
> > From: Di Zhao OS
> > Sent: Sunday, May 29, 2022 11:59 PM
> > To: gcc-patches@gcc.gnu.org
> > Cc: Richard Biener <richard.guenther@gmail.com>
> > Subject: [PATCH v5] tree-optimization/101186 - extend FRE with "equivalence
> > map" for condition prediction
> >
> > Hi, attached is a new version of the patch. The changes are:
> > - Skip using temporary equivalences for floating-point values, because
> > folding expressions can generate incorrect values. For example,
> > operations on 0.0 and -0.0 may have different results.
> > - Avoid inserting duplicated back-refs from value-number to predicates.
> > - Disable fre in testsuite/g++.dg/pr83541.C .
> >
> > Summary of the previous versions:
> > https://gcc.gnu.org/pipermail/gcc-patches/2021-December/587346.html
> >
> > Is the patch still considered?
> >
> > Thanks,
> > Di Zhao
> >
> > ---
> >
> > Extend FRE with temporary equivalences.
> >
> > 2022-05-29  Di Zhao  <dizhao@os.amperecomputing.com>
> >
> > gcc/ChangeLog:
> >         PR tree-optimization/101186
> >         * tree-ssa-sccvn.c (VN_INFO): remove assertions (there could be a
> >         predicate already).
> >         (dominated_by_p_w_unex): Moved upward.
> >         (vn_nary_op_get_predicated_value): Moved upward.
> >         (is_vn_valid_at_bb): Check if vn_pval is valid at BB.
> >         (lookup_equiv_head): Lookup the "equivalence head" of given node.
> >         (lookup_equiv_heads): Lookup the "equivalence head"s of given nodes.
> >         (vn_tracking_edge): Extracted utility function.
> >         (init_vn_nary_op_from_stmt): Insert and lookup by "equivalence
> head"s.
> >         (vn_nary_op_insert_into): Insert new value at the front.
> >         (vn_nary_op_insert_pieces_predicated_1): Insert as predicated values
> >         from pieces.
> >         (fold_const_from_equiv_heads): Fold N-ary expression of equiv-heads.
> >         (push_new_nary_ref): Insert a back-reference to vn_nary_op_t.
> >         (val_equiv_insert): Record temporary equivalence.
> >         (vn_nary_op_insert_pieces_predicated): Record equivalences instead
> of
> >         some predicates; insert back-refs.
> >         (record_equiv_from_prev_phi_1): Record temporary equivalences
> > generated
> >         by PHI nodes.
> >         (record_equiv_from_prev_phi): Given an outgoing edge of a
> conditional
> >         expression taken, record equivalences generated by PHI nodes.
> >         (visit_nary_op): Add lookup previous results of N-ary operations by
> >         equivalences.
> >         (insert_related_predicates_on_edge): Some predicates can be computed
> >         from equivalences, no need to insert them.
> >         (process_bb): Add lookup predicated values by equivalences.
> >         (struct unwind_state): Unwind state of back-refs to vn_nary_op_t.
> >         (do_unwind): Unwind the back-refs to vn_nary_op_t.
> >         (do_rpo_vn): Update back-reference unwind state.
> >         * tree-ssa-sccvn.h (struct nary_ref): hold a lists of references to
> > the
> >         nary map entries.
> >
> > gcc/testsuite/ChangeLog:
> >
> >         * g++.dg/pr83541.C: Disable fre.
> >         * gcc.dg/tree-ssa/pr68619-2.c: Disable fre.
> >         * gcc.dg/tree-ssa/pr71947-1.c: Disable fre.
> >         * gcc.dg/tree-ssa/pr71947-2.c: Disable fre.
> >         * gcc.dg/tree-ssa/pr71947-3.c: Disable fre.
> >         * gcc.dg/tree-ssa/pr71947-5.c: Disable fre.
> >         * gcc.dg/tree-ssa/pr71947-7.c: Disable fre.
> >         * gcc.dg/tree-ssa/pr71947-8.c: Disable fre.
> >         * gcc.dg/tree-ssa/pr71947-9.c: Disable fre.
> >         * gcc.dg/tree-ssa/vrp03.c: Disable fre.
> >         * gcc.dg/tree-ssa/ssa-fre-100.c: New test.
> >         * gcc.dg/tree-ssa/ssa-fre-101.c: New test.
> >         * gcc.dg/tree-ssa/ssa-fre-102.c: New test.
> >         * gcc.dg/tree-ssa/ssa-pre-34.c: New test.

             reply	other threads:[~2022-09-07  7:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-07  7:30 Di Zhao OS [this message]
2022-09-22 12:34 ` Richard Biener
2022-09-22 12:36   ` 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=SN6PR01MB424035A279EFAC55BCCA41C8E8419@SN6PR01MB4240.prod.exchangelabs.com \
    --to=dizhao@os.amperecomputing.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=richard.guenther@gmail.com \
    /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).