[Bug middle-end/115832] Very slow compilation with `-fsanitize=undefined -O2` and std::sort
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Tue Jul 9 05:10:32 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115832
Andrew Pinski <pinskia at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Component|c++ |middle-end
--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
Note:
> warning: MPFR header version 4.1.1-p1 differs from library version 4.2.0.
This is not a good thing but most likely not the cause here.
Note on the trunk, the compile speed is (with added -fno-checking):
```
[apinski@xeond2 upstream-gcc-new]$ time ~/upstream-gcc-new/bin/gcc t.ii -S
-fno-checking
real 0m0.610s
user 0m0.552s
sys 0m0.025s
[apinski@xeond2 upstream-gcc-new]$ time ~/upstream-gcc-new/bin/gcc t.ii -S
-fno-checking -O2
real 0m2.247s
user 0m2.168s
sys 0m0.042s
[apinski@xeond2 upstream-gcc-new]$ time ~/upstream-gcc-new/bin/gcc t.ii -S
-fno-checking -O2 -fsanitize=undefined
real 0m4.128s
user 0m4.010s
sys 0m0.069s
```
I looked at the output of -ftime-report, there does not seen anything that
sticks out really. Plus with -fsanitize=undefined just means there will almost
definitely be much more basic blocks and many more registers alive.
I am not sure there is not much to do here.
More information about the Gcc-bugs
mailing list