MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/cpp/comments/1tig36r/introducing_sample_profile_guided_optimization_in/on5q72i/?context=3
r/cpp • u/pjmlp • May 20 '26
12 comments sorted by
View all comments
Show parent comment
3
Several folks have asked, so I'll give the special linker option to compile functions with little or no profile data as if it was a non-SPGO compile. That is, if you specified -O2 on a function, it will remain so if "cold". This is a linker option:
-d2:-SpgoCompileColdFunctionsWithoutProfileData
2 u/barfyus May 23 '26 Thank you very much! That works!
2
Thank you very much! That works!
View all comments
Show parent comment
3
u/FewCandy943 May 22 '26 edited May 22 '26
Several folks have asked, so I'll give the special linker option to compile functions with little or no profile data as if it was a non-SPGO compile. That is, if you specified -O2 on a function, it will remain so if "cold". This is a linker option:
-d2:-SpgoCompileColdFunctionsWithoutProfileData