Hi, I've implemented hierarchical discriminators for AutoFDO This helps AutoFDO profile accuracy by: - Loop iterations are now uniquely identifiable in profile data - Distinguishes which iteration of an unrolled loop executed hotly and so on.
The discriminator in AutoFDO is is extended from 16 bits to 32 bits with three fields: - Base (12 bits): Traditional same-line disambiguation - Pass1 (12 bits): Optimization context (loop versioning, inlining) - Pass2 (8 bits): Code duplication (loop unrolling, peeling) The inline context tracking (pass1 discriminators for inlining) is NOT added to Thi patch , as initial testing did not show performance improvements. We could add hierarchical discriminator this conditionally via a compiler parameter or a specific compiler options if that is preferred Bootstrapped and regression tested. Initial testing on Spec2017 with AutoFDO shows some good improvements. I am rerunning the full suite and will update the results. Is this OK? Thanks, Kugan
0001-Implement-hierarchical-discriminators-for-AutoFDO.patch
Description: 0001-Implement-hierarchical-discriminators-for-AutoFDO.patch
