Page MenuHomePhabricator

fix weights for promoted indirect calls
Needs ReviewPublic

Authored by david2050 on Feb 1 2019, 8:43 AM.



When an indirect call is inliend, the introduced
operations that guard that direct call have debug
information copied from the original call. This
yields incorrect values for conditionally the
generated blocks. Here we copy the weights directly
from the profile to the BlockWeights map and then
ignore the operations in those blocks.

The added test has a more realistic profile to
illustrate the changes.

Diff Detail

Event Timeline

david2050 created this revision.Feb 1 2019, 8:43 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 1 2019, 8:43 AM
david2050 updated this revision to Diff 184763.Feb 1 2019, 8:47 AM

fix formatting

wmi added a comment.Apr 2 2019, 9:24 AM

That is a good improvement. Thanks! I will evaluate how much impact it will have in our benchmarks.


It is better to understand it with a comment.


Looks like a large part of the profile has not been used. Can we remove them?


Could you add a check for new pass manager?


Looks like a large part of the metadata are unused. Can we remove them?

wmi added a comment.Apr 3 2019, 10:06 AM

No major improvement or regression was found in our test.