Page MenuHomePhabricator

[GlobalOpt][SampleFDO] Add an option to control whether to rename alias target
Needs ReviewPublic

Authored by wmi on Apr 1 2019, 12:08 PM.



GlobalOpt could rename an alias target (aliasee) to its alias when the alias is the only one targeting the aliasee. However, this could cause problem for SampleFDO. Because once the alias target is renamed and then removed, it will not appear in the final binary and the profile. During profile use, sample profile loader will not find the function profile at the time of profile annotation.

We need to keep the alias target even for non-SampleFDO build targets if only it is possible that sample profile may be used in their next build cycle, so we add an option to make disabling alias target renaming possible.

In the long run, we may want to look at how to make sample profile loader not only look for profile with the target function name, but also those profiles with the names of all possible aliases. That may bring the benefit of reducing the sample profile size in addition.

Diff Detail


Event Timeline

wmi created this revision.Apr 1 2019, 12:08 PM
Herald added a project: Restricted Project. ยท View Herald TranscriptApr 1 2019, 12:08 PM
wmi added a reviewer: eraman.Apr 23 2019, 10:25 AM