This is an archive of the discontinued LLVM Phabricator instance.

treat invoke like call
ClosedPublic

Authored by david2050 on Jan 9 2019, 7:13 AM.

Details

Summary

InvokeInst should be treated like CallInst and
assigned a separate discriminator. This is particularly
import when an Invoke is converted to a Call
during compilation and so can invalidate sample profile
data collected wtih different link time optimizations

Diff Detail

Repository
rL LLVM

Event Timeline

david2050 created this revision.Jan 9 2019, 7:13 AM
wmi added a comment.Jan 14 2019, 10:10 AM

Could you have a testcase for it?

wmi accepted this revision.Jan 15 2019, 9:47 AM

LGTM.

lib/Transforms/Utils/AddDiscriminators.cpp
239–244 ↗(On Diff #181674)

nit: Can we merge it to?

if ((!isa<CallInst>(I) && !isa<InvokeInst>(I)) || isa<IntrinsicInst>(I))
  continue;
This revision is now accepted and ready to land.Jan 15 2019, 9:47 AM

simplify loop continue test

This revision was automatically updated to reflect the committed changes.
david2050 marked an inline comment as done.