[Bug middle-end/114579] RTL expansion add_scope_conflicts is slow

2024-05-02 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114579

Richard Biener  changed:

   What|Removed |Added

   Target Milestone|--- |15.0
 Resolution|--- |FIXED
 Status|NEW |RESOLVED

--- Comment #4 from Richard Biener  ---
Fixed for GCC 15, I don't have a testcase that's slow here anymore.

[Bug middle-end/114579] RTL expansion add_scope_conflicts is slow

2024-05-02 Thread cvs-commit at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114579

--- Comment #3 from GCC Commits  ---
The master branch has been updated by Richard Biener :

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

commit r15-99-gbbe83599320288025a417c54d9afcb3885cb2766
Author: Richard Biener 
Date:   Thu Apr 4 14:00:10 2024 +0200

middle-end/114579 - speed up add_scope_conflicts

The following speeds up stack variable conflict detection by recognizing
that the all-to-all conflict recording is only necessary for CFG merges
as it's the unioning of the live variable sets that doesn't come with
explicit mentions we record conflicts for.

If we employ this optimization we have to make sure to perform the
all-to-all conflict recording for all CFG merges even those into
empty blocks where we might previously have skipped this.

I have reworded the comment before the all-to-all conflict recording
since it seemed to be confusing and missing the point - but maybe I
am also missing something here.

Nevertheless for the testcase in the PR the compile-time spend in
add_scope_conflicts at -O1 drops from previously 67s (39%) to 10s (9%).

PR middle-end/114579
* cfgexpand.cc (add_scope_conflicts_1): Record all-to-all
conflicts only when there's a CFG merge but for all CFG merges.

[Bug middle-end/114579] RTL expansion add_scope_conflicts is slow

2024-04-05 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114579

Andrew Pinski  changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
   Last reconfirmed||2024-04-05
 Ever confirmed|0   |1

--- Comment #2 from Andrew Pinski  ---
Confirmed.

[Bug middle-end/114579] RTL expansion add_scope_conflicts is slow

2024-04-04 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114579

--- Comment #1 from Richard Biener  ---
Created attachment 57872
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=57872=edit
patch

Doing this no longer will be able to handle A conflicts B, B conflicts C
but A does not conflict C.  But it might be something for -O1.