This patch fixes wrong annotation of profiles when call statement is
de-duplicated. i.e., when we may have same stmt executing from
more than one path (by jumping to same statment). Thus, the
profile we get will be for multiple paths and would make the annotated
profile wrong. As a fix, we dont annotate profile for GIMPLE_CALL stmt
and extract BB counts from edge counts.

Regression tested on aarch64-linux-gnu with no new regression. 
Also successfully  done autoprofiledbootstrap with the relevant patch.

Is this OK for trunk?
Thanks,
Kugan

Attachment: 0001-AUTOFDO-Fix-annotated-profile-for-de-duplicated-call.patch
Description: 0001-AUTOFDO-Fix-annotated-profile-for-de-duplicated-call.patch

Reply via email to