Don't reduce inline limit for afdo enabled projects

Test: presubmit
Change-Id: Id964165c7af50da9cd5e92c25ad2c4191eb2147a
This commit is contained in:
Yi Kong
2022-02-14 20:00:10 +08:00
parent d107272436
commit 4ef5459f7d
2 changed files with 13 additions and 1 deletions

View File

@@ -123,7 +123,7 @@ func (lto *lto) flags(ctx BaseModuleContext, flags Flags) Flags {
// If the module does not have a profile, be conservative and limit cross TU inline
// limit to 5 LLVM IR instructions, to balance binary size increase and performance.
if !ctx.isPgoCompile() {
if !ctx.isPgoCompile() && !ctx.isAfdoCompile() {
flags.Local.LdFlags = append(flags.Local.LdFlags,
"-Wl,-plugin-opt,-import-instr-limit=5")
}