Page MenuHomePhabricator

[Profile] Preserve branch meta data in CGP lowering of select instruction
ClosedPublic

Authored by davidxl on Sep 1 2016, 4:26 PM.

Details

Summary

When CGP lowers select back to control flow, the weight meta data gets dropped. This patch fixes the problem.

Diff Detail

Repository
rL LLVM

Event Timeline

davidxl updated this revision to Diff 70093.Sep 1 2016, 4:26 PM
davidxl retitled this revision from to [Profile] Preserve branch meta data in CGP lowering of select instruction.
davidxl updated this object.
davidxl added reviewers: dexonsmith, spatel, danielcdh.
davidxl added a subscriber: llvm-commits.
danielcdh accepted this revision.Sep 1 2016, 4:29 PM
danielcdh edited edge metadata.
This revision is now accepted and ready to land.Sep 1 2016, 4:29 PM
davidxl updated this revision to Diff 70257.Sep 2 2016, 5:01 PM
davidxl edited edge metadata.

The builder interface should copy all branch related meta data if-available. The new interface will also replace similar code in loop unswitch (followup).

Dehao, the new change also copies over debug location meta data to the branch. What is the potential impact of this to Sample PGO?

This shouldn't affect sample pgo because we don't use branch instruction for annotation.

This revision was automatically updated to reflect the committed changes.