This is an archive of the discontinued LLVM Phabricator instance.

Do not set branch weight if the branch weight annotation is present.
ClosedPublic

Authored by danielcdh on Mar 21 2017, 6:15 PM.

Details

Summary

ThinLTO will annotate the CFG twice. If the branch weight is set by the first annotation, we should not set the branch weight again in the second annotation because the first annotation is more accurate as there is less optimization that could affect debug info accuracy.

Event Timeline

danielcdh created this revision.Mar 21 2017, 6:15 PM
This revision is now accepted and ready to land.Mar 23 2017, 7:36 AM
danielcdh closed this revision.Mar 23 2017, 7:55 AM