Enable MLGO for register allocation

This enables Machine Learning Guided Optimizations (MLGO) for register
allocation. App launch performance on oriole-userdebug is improved by
0.53%, and binary size is very slightly reduced (e.g. 64 bytes for
libart.so).

https://dashboards.corp.google.com/_0e1b06dd_a79e_4433_b625_b62e5cac004b?p=BootImageProfileId:36265

Test: presubmit
Bug: 229056536
Change-Id: I0e5d40bb90a1555a1343f114ebffffca281f20b2
This commit is contained in:
Yi Kong 2023-09-01 21:52:36 +09:00
parent 079efbda94
commit 67a2dee8c5

View file

@ -140,6 +140,9 @@ var (
"-Werror=format-security",
"-nostdlibinc",
// Enable MLGO for register allocation.
"-mllvm -regalloc-enable-advisor=release",
// Emit additional debug info for AutoFDO
"-fdebug-info-for-profiling",
}
@ -167,6 +170,8 @@ var (
"-Wl,--exclude-libs,libgcc_stripped.a",
"-Wl,--exclude-libs,libunwind_llvm.a",
"-Wl,--exclude-libs,libunwind.a",
// Enable MLGO for register allocation.
"-Wl,-mllvm,-regalloc-enable-advisor=release",
}
deviceGlobalLldflags = append(deviceGlobalLdflags, commonGlobalLldflags...)