This is an archive of the discontinued LLVM Phabricator instance.

Fix the InstCombine to reserve the VP metadata and sets correct call count.
ClosedPublic

Authored by danielcdh on Mar 24 2017, 9:46 AM.

Details

Summary

Currently the VP metadata was dropped when InstCombine converts a call to direct call. This patch converts the VP metadata to branch_weights so that its hotness is recorded.

Event Timeline

danielcdh created this revision.Mar 24 2017, 9:46 AM
davidxl accepted this revision.Mar 30 2017, 7:47 PM

lgtm

lib/Transforms/InstCombine/InstCombineCalls.cpp
4134

Add a comment here for the need of preserving vp data.

This revision is now accepted and ready to land.Mar 30 2017, 7:47 PM
danielcdh updated this revision to Diff 93659.Mar 31 2017, 9:12 AM
danielcdh marked an inline comment as done.

rebase and update

danielcdh closed this revision.Mar 31 2017, 9:12 AM
This revision was automatically updated to reflect the committed changes.