> Not for instrumented FDO (not as I know of). But for AutoFDO, this
> could be a potential risk because some callee is marked unlikely
> executed simply because they are inlined and eliminated in the O2
> binary. But in ipa-inline it will not get inlined because the edge is
> not hot from cgraph_maybe_hot_edge_p (because callee is
> UNLIKELY_EXECUTED), while the edge->count is actually hot.

Can't you prevent setting calle to UNLIKELY_EXECUTED in these cases instead?
It seems that having profile set incorrectly will lead to other problems later, 
too.
We discussed similar problem with Teresa about the missing profiles for comdat,
basically one should detect these cases as profile being lost and go with 
guessed
profile.  (I believe patch for that was posted, too, and so far it seems best 
approach
to this issue)

Honza

Reply via email to