llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
27.92k stars 11.52k forks source link

PGO-Enabled lld become no-op due to early exit #100516

Open Naville opened 1 month ago

Naville commented 1 month ago

Ref: https://github.com/llvm/llvm-project/blob/2e0c2154a8dc5d8ab2a8cf360aa0184fb58c0860/lld/tools/lld/lld.cpp#L90

Due to early exit. PGO in lld won't be called to writeout the collected PGO profile before exiting

Andarwinux commented 1 month ago

just export LLD_IN_TEST=1

Naville commented 1 month ago

just export LLD_IN_TEST=1

Yes, this is what we did in downstream as a temporary workaround. However this seems counterintuitive and misleading? (It's not clear to another innocent user like me how test is related to PGO)