[lld] [LLD][ELF] add bp-* options in ELF (PR #120514)

Ellis Hoag via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 6 19:12:13 PST 2025


ellishg wrote:

@Andarwinux It doesn't make sense to pass `--irpgo-profile=foo.profdata` (or use `--bp-compression-sort=both` `--bp-startup-sort=function`) during CSIRPGO generation (`-fcs-profile-generate`). These flags will only impact the function and data order in the final binary, which will not impact the resulting generated profiles. It only makes sense to use these to build your final optimized binary.

If we wanted to improve usability, we could have clang automatically pass `--irpgo-profile=foo.profdata` to the linker, but I don't think it makes sense to use the existing CSIRPGO linker flags.

https://github.com/llvm/llvm-project/pull/120514


More information about the llvm-commits mailing list