[clang] [Driver] Don't default to -mrelax-all for non-RISCV -O0 (PR #90013)
Fangrui Song via cfe-commits
cfe-commits at lists.llvm.org
Fri Apr 26 12:02:24 PDT 2024
MaskRay wrote:
> FYI I'm seeing about 0.6% compile-time regressions for `O0` test-suite builds with this change ([llvm-compile-time-tracker.com/compare.php?from=ef2ca97f48f1aee1483f0c29de5ba52979bec454&to=18376810f359dbd39d2a0aa0ddfc0f7f50eac199&stat=instructions:u](https://llvm-compile-time-tracker.com/compare.php?from=ef2ca97f48f1aee1483f0c29de5ba52979bec454&to=18376810f359dbd39d2a0aa0ddfc0f7f50eac199&stat=instructions:u)). Though there is also a 4.5% reduction in text size ([llvm-compile-time-tracker.com/compare.php?from=ef2ca97f48f1aee1483f0c29de5ba52979bec454&to=18376810f359dbd39d2a0aa0ddfc0f7f50eac199&stat=size-text](https://llvm-compile-time-tracker.com/compare.php?from=ef2ca97f48f1aee1483f0c29de5ba52979bec454&to=18376810f359dbd39d2a0aa0ddfc0f7f50eac199&stat=size-text)) so maybe the tradeoff is reasonable even for `O0`.
Thanks for the numbers!
It's my understanding that the increase in .text size outweighs the assembly time benefit of -mrelax-all... (A trick to remove one iteration in the branch displacement (span-dependent instruction) algorithm).
https://github.com/llvm/llvm-project/pull/90013
More information about the cfe-commits
mailing list