This is an archive of the discontinued LLVM Phabricator instance.

[InstCombine] Fix !prof metadata preservation for invokes
ClosedPublic

Authored by rnk on Apr 13 2017, 1:00 PM.

Details

Summary

Bug noticed by inspection.

Extend the test to handle invokes as well as calls, and rewrite it to
not depend on the inliner and other passes.

Also simplify the call site replacement code with CallSite, similar to
what I did to dead arg elimination and arg promotion (rL300235 and
rL300229).

Event Timeline

rnk created this revision.Apr 13 2017, 1:00 PM
davidxl accepted this revision.Apr 13 2017, 1:19 PM

good cleanup, lgtm

This revision is now accepted and ready to land.Apr 13 2017, 1:19 PM
This revision was automatically updated to reflect the committed changes.
yrouban added inline comments.
llvm/trunk/lib/Transforms/InstCombine/InstCombineCalls.cpp
4142 ↗(On Diff #95195)

Reid, any reason to make "branch_weights" here from "VP"?
Do you mind if I preserve either "branch_weights" or "VP" by exact copying?

Herald added a project: Restricted Project. · View Herald TranscriptMay 22 2020, 5:44 AM