-
Notifications
You must be signed in to change notification settings - Fork 12.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
-Wall causes massive compilation slowdown #105959
Comments
We are spending the vast majority of our time in Here are some timing tests I did on Windows:
(I did not let the non- So |
I explained it badly - it is not a regression between version 18 and 20. If I try to compile the file ipret.e with clang-18 on the same machine, I get 17 minutes without -Wall and 49 minutes with -Wall. So it seems that the -Wall slowdown was always there. |
Ah, thank you for the update, that makes so much more sense to me! Despite not being a new issue, this is still worth investigating how we can improve; that much of a compile time performance hit is hard to swallow (it would normally be enough to remove this from CC @gribozavr @ymand @sgatev as CFG code owners |
BTW. when I compare performance of the binary generated by clang-18, clang-20 and gcc-14, I get: So, clang-20 compiles faster than clang-18, but it produces slower code. Should I create another bug report for this regression? |
Yeah, it's worth filing an issue over. FWIW, it would be helpful if you were able to give a small reproducer instead of a whole program, if possible! |
OK. I made a simple reproducer and submitted it here: #106846 |
My c++ config is "cpp": "cd $dir && g++ -std=c++17 -g-Wall -lm -o $fileNameWithoutExt && $dir$fileNameWithoutExt" when i try to run using the keyboard shortcut/ run code my terminal says unrecognized debug output level '-Wall' mean when i run c++ |
Download an example file from:
http://www.jikos.cz/~mikulas/testcases/clang/ipret.e
(the file comes from Ajla, https://www.ajla-lang.cz/ )
If you compile it with
$ time clang-20 -c -x c ipret.e -O2
it takes 23 seconds
If you compile it with
$ time clang-20 -c -x c ipret.e -O2 -Wall
it takes 31 minutes
I tested it with clang-20 from Debian Sid. On clang-18 and older, it takes a long time to compile the file even without -Wall, but the -Wall switch makes it twice worse.
Also, note that while clang-19 and clang-20 compile faster than clang-18, the code generated by clang-19 and clang-20 for this file is inferior to the code generated by clang-18 and older.
The text was updated successfully, but these errors were encountered: