This is an archive of the discontinued LLVM Phabricator instance.

Update profile during memory instrinsic optimization
ClosedPublic

Authored by tejohnson on Apr 24 2017, 11:44 AM.

Details

Summary

Ensure that the new merge BB (which contains the rest of the original BB
after the mem op being optimized) gets a profile frequency, in case
there are additional mem ops later in the BB. Otherwise they get skipped
as the merge BB looks cold.

Diff Detail

Repository
rL LLVM

Event Timeline

tejohnson created this revision.Apr 24 2017, 11:44 AM
davidxl added inline comments.Apr 24 2017, 11:51 AM
lib/Transforms/Instrumentation/IndirectCallPromotion.cpp
955 ↗(On Diff #96435)

This comment seems unnecessary :) Also can you move the DefaultBB setting after MergeBB update?

tejohnson added inline comments.Apr 24 2017, 11:53 AM
lib/Transforms/Instrumentation/IndirectCallPromotion.cpp
955 ↗(On Diff #96435)

Sure. I mostly added the comment to indicate why it was important to update the MergeBB profile frequency specifically (and not the other new BBs), but can remove it.

tejohnson updated this revision to Diff 96436.Apr 24 2017, 11:56 AM

Update per comments

This revision is now accepted and ready to land.Apr 24 2017, 11:57 AM
This revision was automatically updated to reflect the committed changes.