This is an archive of the discontinued LLVM Phabricator instance.

Analysis: Correctly handle all function operand references.
ClosedPublic

Authored by pcc on Sep 6 2017, 8:56 PM.

Details

Summary

The current code for adding classes to the reference set does not
correctly handle the case where a function's personality function
operand refers to the function indirectly (e.g. via a bitcast). This
patch handles such cases by treating the personality function
references like any other reference, i.e. by adding them to the
function's reference list. This has the minor side benefit of allowing
personality functions to participate in early dead stripping.

We do this by calling addRefEdges on the function itself. This way
we also end up handling other function operands (specifically prefix
data and prologue data) for free.

Diff Detail

Repository
rL LLVM

Event Timeline

pcc created this revision.Sep 6 2017, 8:56 PM
pcc added a subscriber: yunlian.Sep 6 2017, 8:59 PM
This revision is now accepted and ready to land.Sep 6 2017, 10:09 PM
This revision was automatically updated to reflect the committed changes.