HomePhabricator

[AutoFDO] Avoid merging inlinee samples multiple times

Authored by hoy on Jul 30 2020, 6:22 PM.

Description

[AutoFDO] Avoid merging inlinee samples multiple times

A function call can be replicated by optimizations like loop unroll and jump threading and the replicates end up sharing the sample nested callee profile. Therefore when it comes to merging samples for uninlined callees in the sample profile inliner, a callee profile can be merged multiple times which will cause an assert to fire.

This change avoids merging same callee profile for duplicate callsites by filtering out callee profiles with a non-zero head sample count.

Reviewed By: wenlei, wmi

Differential Revision: https://reviews.llvm.org/D84997

Details

Committed
hoyJul 31 2020, 9:30 AM
Reviewer
wenlei
Differential Revision
D84997: [AutoFDO] Avoid merging inlinee samples multiple times
Parents
rGc75c7d51968d: [gn build] Port df69492cdfa
Branches
Unknown
Tags
Unknown