This is an archive of the discontinued LLVM Phabricator instance.

[Statepoints] Disable VReg lowering for values used on exception path of invoke.
ClosedPublic

Authored by dantrushin on Dec 17 2020, 4:03 AM.

Details

Summary

Currently we lower invokes the same way as usual calls, e.g.:

V1 = STATEPOINT ... V (tied-def 0)

But this is incorrect is V1 is used on exceptional path.
By LLVM rules V1 neither dominates its uses in landing pad, nor
its live range is live on entry to landing pad. So compiler is
allowed to do various weird transformations like splitting live
range after statepoint and use split LR in catch block.

Until (and if) we find better solution to this problem, let's
use old lowering (spilling) for those values which are used on
exceptional path and allow VReg lowering for values used only
on normal path.

Diff Detail

Event Timeline

dantrushin created this revision.Dec 17 2020, 4:03 AM
dantrushin requested review of this revision.Dec 17 2020, 4:03 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 17 2020, 4:03 AM
This revision is now accepted and ready to land.Dec 17 2020, 11:01 PM
This revision was landed with ongoing or failed builds.Dec 21 2020, 5:27 AM
This revision was automatically updated to reflect the committed changes.