public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
* [Bug tree-optimization/79958] Missed tree DSE [not found] <bug-79958-4@http.gcc.gnu.org/bugzilla/> @ 2021-08-14 22:59 ` pinskia at gcc dot gnu.org 2024-05-15 16:33 ` rguenth at gcc dot gnu.org ` (2 subsequent siblings) 3 siblings, 0 replies; 4+ messages in thread From: pinskia at gcc dot gnu.org @ 2021-08-14 22:59 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79958 Andrew Pinski <pinskia at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed|2017-03-10 00:00:00 |2021-8-14 Severity|normal |enhancement --- Comment #4 from Andrew Pinski <pinskia at gcc dot gnu.org> --- With the reduced testcase in comment #2 and -O2 -fno-tree-dce we still get: x.i = 1; if (b_3(D) != 0) goto <bb 3>; [0.04%] else goto <bb 4>; [99.96%] <bb 3> [local count: 429496]: bar (); __builtin_abort (); <bb 4> [local count: 1073312329]: bar (); [tail call] x ={v} {CLOBBER}; As Richi mentioned tree level DCE can figure it out for the reduced testcase while DSE cannot. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/79958] Missed tree DSE [not found] <bug-79958-4@http.gcc.gnu.org/bugzilla/> 2021-08-14 22:59 ` [Bug tree-optimization/79958] Missed tree DSE pinskia at gcc dot gnu.org @ 2024-05-15 16:33 ` rguenth at gcc dot gnu.org 2024-05-16 9:04 ` cvs-commit at gcc dot gnu.org 2024-05-16 9:05 ` rguenth at gcc dot gnu.org 3 siblings, 0 replies; 4+ messages in thread From: rguenth at gcc dot gnu.org @ 2024-05-15 16:33 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79958 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|unassigned at gcc dot gnu.org |rguenth at gcc dot gnu.org Status|NEW |ASSIGNED --- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> --- Testing a patch. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/79958] Missed tree DSE [not found] <bug-79958-4@http.gcc.gnu.org/bugzilla/> 2021-08-14 22:59 ` [Bug tree-optimization/79958] Missed tree DSE pinskia at gcc dot gnu.org 2024-05-15 16:33 ` rguenth at gcc dot gnu.org @ 2024-05-16 9:04 ` cvs-commit at gcc dot gnu.org 2024-05-16 9:05 ` rguenth at gcc dot gnu.org 3 siblings, 0 replies; 4+ messages in thread From: cvs-commit at gcc dot gnu.org @ 2024-05-16 9:04 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79958 --- Comment #6 from GCC 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:1e0ae1f52741f7e0133661659ed2d210f939a398 commit r15-571-g1e0ae1f52741f7e0133661659ed2d210f939a398 Author: Richard Biener <rguenther@suse.de> Date: Wed May 15 18:32:37 2024 +0200 tree-optimization/79958 - make DSE track multiple paths DSE currently gives up when the path we analyze forks. This leads to multiple missed dead store elimination PRs. The following fixes this by recursing for each path and maintaining the visited bitmap to avoid visiting CFG re-merges multiple times. The overall cost is still limited by the same bound, it's just more likely we'll hit the limit now. The patch doesn't try to deal with byte tracking once a path forks but drops info on the floor and only handling fully dead stores in that case. PR tree-optimization/79958 PR tree-optimization/109087 PR tree-optimization/100314 PR tree-optimization/114774 * tree-ssa-dse.cc (dse_classify_store): New forwarder. (dse_classify_store): Add arguments cnt and visited, recurse to track multiple paths when we end up with multiple defs. * gcc.dg/tree-ssa/ssa-dse-48.c: New testcase. * gcc.dg/tree-ssa/ssa-dse-49.c: Likewise. * gcc.dg/tree-ssa/ssa-dse-50.c: Likewise. * gcc.dg/tree-ssa/ssa-dse-51.c: Likewise. * gcc.dg/graphite/pr80906.c: Avoid DSE of last data reference in loop. * g++.dg/ipa/devirt-24.C: Adjust for extra DSE. * g++.dg/warn/Wuninitialized-pr107919-1.C: Use more important -O2 optimization level, -O1 regresses. ^ permalink raw reply [flat|nested] 4+ messages in thread
* [Bug tree-optimization/79958] Missed tree DSE [not found] <bug-79958-4@http.gcc.gnu.org/bugzilla/> ` (2 preceding siblings ...) 2024-05-16 9:04 ` cvs-commit at gcc dot gnu.org @ 2024-05-16 9:05 ` rguenth at gcc dot gnu.org 3 siblings, 0 replies; 4+ messages in thread From: rguenth at gcc dot gnu.org @ 2024-05-16 9:05 UTC (permalink / raw) To: gcc-bugs https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79958 Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |RESOLVED Target Milestone|--- |15.0 Resolution|--- |FIXED --- Comment #7 from Richard Biener <rguenth at gcc dot gnu.org> --- Should be fixed for GCC 15. ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-05-16 9:05 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <bug-79958-4@http.gcc.gnu.org/bugzilla/> 2021-08-14 22:59 ` [Bug tree-optimization/79958] Missed tree DSE pinskia at gcc dot gnu.org 2024-05-15 16:33 ` rguenth at gcc dot gnu.org 2024-05-16 9:04 ` cvs-commit at gcc dot gnu.org 2024-05-16 9:05 ` rguenth 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).