public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/66502] SCCVN can't handle PHIs optimistically optimally
       [not found] <bug-66502-4@http.gcc.gnu.org/bugzilla/>
@ 2015-06-11  9:19 ` rguenth at gcc dot gnu.org
  2015-08-13  7:06 ` rguenth at gcc dot gnu.org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-06-11  9:19 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66502

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2015-06-11
           Assignee|unassigned at gcc dot gnu.org      |rguenth at gcc dot gnu.org
     Ever confirmed|0                           |1

--- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> ---
https://gcc.gnu.org/ml/gcc-patches/2015-06/msg00760.html was posted that
changes the current preference to handle the first testcase (but no longer
the second).  The first opportunity is frequently introduced by the vectorizer,
together with redundant loads, that are not eliminated in any way currently.

IVOPTs can remove redundant IVs but the issue is usually that it can't prove
the initial values are the same nor does it remove the redundant loads
leading to cost model issues (DOM might later remove the redundant loads).

The above mentioned patch passed bootstrap & regtest on
x86_64-unknown-linux-gnu.

Enlarging the SCCs to cover all candidates is a bit tricky in the current
framework, I still like to experiment with that idea.


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug tree-optimization/66502] SCCVN can't handle PHIs optimistically optimally
       [not found] <bug-66502-4@http.gcc.gnu.org/bugzilla/>
  2015-06-11  9:19 ` [Bug tree-optimization/66502] SCCVN can't handle PHIs optimistically optimally rguenth at gcc dot gnu.org
@ 2015-08-13  7:06 ` rguenth at gcc dot gnu.org
  2015-08-13  7:11 ` rguenth at gcc dot gnu.org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-08-13  7:06 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66502

--- Comment #3 from Richard Biener <rguenth at gcc dot gnu.org> ---
Author: rguenth
Date: Thu Aug 13 07:06:10 2015
New Revision: 226850

URL: https://gcc.gnu.org/viewcvs?rev=226850&root=gcc&view=rev
Log:
2015-08-13  Richard Biener  <rguenther@suse.de>

        PR tree-optimization/66502
        PR tree-optimization/67167
        * tree-ssa-sccvn.c (vn_phi_compute_hash): Do not include
        backedge arguments.
        (vn_phi_lookup): Adjust.
        (vn_phi_insert): Likewise.
        (visit_phi): Prefer to value-number to another PHI node
        over value-numbering to a PHI argument.
        (init_scc_vn): Mark DFS back edges.

        * gcc.dg/tree-ssa/ssa-fre-46.c: New testcase.

Added:
    trunk/gcc/testsuite/gcc.dg/tree-ssa/ssa-fre-46.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/testsuite/ChangeLog
    trunk/gcc/tree-ssa-sccvn.c


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug tree-optimization/66502] SCCVN can't handle PHIs optimistically optimally
       [not found] <bug-66502-4@http.gcc.gnu.org/bugzilla/>
  2015-06-11  9:19 ` [Bug tree-optimization/66502] SCCVN can't handle PHIs optimistically optimally rguenth at gcc dot gnu.org
  2015-08-13  7:06 ` rguenth at gcc dot gnu.org
@ 2015-08-13  7:11 ` rguenth at gcc dot gnu.org
  2021-12-13  8:31 ` pinskia at gcc dot gnu.org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2015-08-13  7:11 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66502

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
SCCVN preference changed.  Missed optimization remains (now the other variant).


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug tree-optimization/66502] SCCVN can't handle PHIs optimistically optimally
       [not found] <bug-66502-4@http.gcc.gnu.org/bugzilla/>
                   ` (2 preceding siblings ...)
  2015-08-13  7:11 ` rguenth at gcc dot gnu.org
@ 2021-12-13  8:31 ` pinskia at gcc dot gnu.org
  2022-01-03  9:50 ` rguenth at gcc dot gnu.org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-12-13  8:31 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66502

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
(In reply to Richard Biener from comment #4)
> SCCVN preference changed.  Missed optimization remains (now the other
> variant).

GCC 10 looks like it can handle both now. I don't know if that means this can
be marked as fixed though.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug tree-optimization/66502] SCCVN can't handle PHIs optimistically optimally
       [not found] <bug-66502-4@http.gcc.gnu.org/bugzilla/>
                   ` (3 preceding siblings ...)
  2021-12-13  8:31 ` pinskia at gcc dot gnu.org
@ 2022-01-03  9:50 ` rguenth at gcc dot gnu.org
  2022-01-03  9:50 ` cvs-commit at gcc dot gnu.org
  2022-01-07  6:38 ` pinskia at gcc dot gnu.org
  6 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2022-01-03  9:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66502

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
      Known to work|                            |10.3.1
             Status|ASSIGNED                    |RESOLVED

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #5)
> (In reply to Richard Biener from comment #4)
> > SCCVN preference changed.  Missed optimization remains (now the other
> > variant).
> 
> GCC 10 looks like it can handle both now. I don't know if that means this
> can be marked as fixed though.

So it looks like we now first value-number j to a (backedge not executable)
and in the second iteration (backedge executable) we value-number it to i.
I guess the special-casing of a single executable edge makes this work now
and also ensure we don't oscillate between both choices.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug tree-optimization/66502] SCCVN can't handle PHIs optimistically optimally
       [not found] <bug-66502-4@http.gcc.gnu.org/bugzilla/>
                   ` (4 preceding siblings ...)
  2022-01-03  9:50 ` rguenth at gcc dot gnu.org
@ 2022-01-03  9:50 ` cvs-commit at gcc dot gnu.org
  2022-01-07  6:38 ` pinskia at gcc dot gnu.org
  6 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-01-03  9:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66502

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Richard Biener <rguenth@gcc.gnu.org>:

https://gcc.gnu.org/g:cd83fd98a7e769ac7ded28377984f68238812a26

commit r12-6182-gcd83fd98a7e769ac7ded28377984f68238812a26
Author: Richard Biener <rguenther@suse.de>
Date:   Mon Jan 3 10:48:57 2022 +0100

    tree-optimization/66502 - add testcase

    This adds the second testcase which we now also handle eliminating
    a redundant PHI node.

    2022-01-03  Richard Biener  <rguenther@suse.de>

            PR tree-optimization/66502
            * gcc.dg/tree-ssa/ssa-fre-98.c: New testcase.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [Bug tree-optimization/66502] SCCVN can't handle PHIs optimistically optimally
       [not found] <bug-66502-4@http.gcc.gnu.org/bugzilla/>
                   ` (5 preceding siblings ...)
  2022-01-03  9:50 ` cvs-commit at gcc dot gnu.org
@ 2022-01-07  6:38 ` pinskia at gcc dot gnu.org
  6 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-01-07  6:38 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66502

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|---                         |10.0

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2022-01-07  6:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-66502-4@http.gcc.gnu.org/bugzilla/>
2015-06-11  9:19 ` [Bug tree-optimization/66502] SCCVN can't handle PHIs optimistically optimally rguenth at gcc dot gnu.org
2015-08-13  7:06 ` rguenth at gcc dot gnu.org
2015-08-13  7:11 ` rguenth at gcc dot gnu.org
2021-12-13  8:31 ` pinskia at gcc dot gnu.org
2022-01-03  9:50 ` rguenth at gcc dot gnu.org
2022-01-03  9:50 ` cvs-commit at gcc dot gnu.org
2022-01-07  6:38 ` pinskia at gcc dot gnu.org

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).