[PATCH] D37553: Analysis: Correctly handle all function operand references.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 6 20:56:26 PDT 2017


pcc created this revision.
Herald added subscribers: hiraditya, eraman, mehdi_amini.

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.


https://reviews.llvm.org/D37553

Files:
  llvm/lib/Analysis/ModuleSummaryAnalysis.cpp
  llvm/test/ThinLTO/X86/Inputs/personality.ll
  llvm/test/ThinLTO/X86/personality.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D37553.114121.patch
Type: text/x-patch
Size: 3881 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170907/a863d4ef/attachment.bin>


More information about the llvm-commits mailing list