Skip to content
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

clang: Build with PGO and ThinLTO #329

Merged
merged 2 commits into from
Aug 31, 2024
Merged

clang: Build with PGO and ThinLTO #329

merged 2 commits into from
Aug 31, 2024

Conversation

ptr1337
Copy link
Member

@ptr1337 ptr1337 commented Aug 31, 2024

Benchmarks:

@ptr1337 , 9950X

PGO ThinLTO Clang, modprobed.db kernel, ThinLTO enabled
________________________________________________________
Executed in  175.51 secs    fish           external
   usr time   39.54 mins    0.00 micros   39.54 mins
   sys time    2.74 mins  133.00 micros    2.74 mins

GCC built Clang from znver4 repository
________________________________________________________
Executed in  195.74 secs    fish           external
   usr time   49.87 mins    0.00 micros   49.87 mins
   sys time    2.78 mins  142.00 micros    2.78 mins

Yuby, 5800X

CachyOS kernel + ThinLTO + Nvidia + modprobed

clang 18.1.8-2 8:21
clang 18.1.8-3 6:56

@1Naim Mesa ThinLTO Compilation

Optimized clang + llvm
Executed in   16.77 mins    fish           external
   usr time  165.51 mins    0.00 micros  165.51 mins
   sys time    4.39 mins  658.00 micros    4.39 mins

Unchanged clang + llvm
Executed in   20.26 mins    fish           external
   usr time  212.03 mins    0.42 millis  212.03 mins
   sys time    4.69 mins    1.43 millis    4.69 mins

@ptr1337
Copy link
Member Author

ptr1337 commented Aug 31, 2024

@1Naim

sudo pacman -U https://archive.cachyos.org/clang-pgo-thinlto/clang-18.1.8-3-x86_64_v3.pkg.tar.zst

@1Naim
Copy link
Member

1Naim commented Aug 31, 2024

save my cpu....

@ptr1337
Copy link
Member Author

ptr1337 commented Aug 31, 2024

YUBY from Discord had following results:

CachyOS kernel + ThinLTO + Nvidia + modprobed

clang 18.1.8-2 8:21
clang 18.1.8-3 6:56

@ptr1337
Copy link
Member Author

ptr1337 commented Aug 31, 2024

Made a kernel compilation, with modprobed db + ThinLTO enabled.
The packaging time and pahole is there also included, but its quite faster:

PGO ThinLTO Clang, modprobed.db kernel, ThinLTO enabled
________________________________________________________
Executed in  175.51 secs    fish           external
   usr time   39.54 mins    0.00 micros   39.54 mins
   sys time    2.74 mins  133.00 micros    2.74 mins

GCC built Clang from znver4 repository
________________________________________________________
Executed in  195.74 secs    fish           external
   usr time   49.87 mins    0.00 micros   49.87 mins
   sys time    2.78 mins  142.00 micros    2.78 mins

Means a 10% improvement for the whole kernel. This seems like a major win.

@1Naim
Copy link
Member

1Naim commented Aug 31, 2024

Building mesa with clang + ThinLTO

Optimized clang + llvm
Executed in   16.77 mins    fish           external
   usr time  165.51 mins    0.00 micros  165.51 mins
   sys time    4.39 mins  658.00 micros    4.39 mins

Unchanged clang + llvm
Executed in   20.26 mins    fish           external
   usr time  212.03 mins    0.42 millis  212.03 mins
   sys time    4.69 mins    1.43 millis    4.69 mins

@ptr1337 ptr1337 marked this pull request as ready for review August 31, 2024 19:08
@ptr1337 ptr1337 merged commit c957cc2 into master Aug 31, 2024
@ptr1337 ptr1337 deleted the clang-pgo-thinlto branch August 31, 2024 19:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants