[PATCH] D93449: [Statepoints] Disable VReg lowering for values used on exception path of invoke.

Denis Antrushin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 17 04:03:32 PST 2020


dantrushin created this revision.
dantrushin added a reviewer: skatkov.
Herald added subscribers: pengfei, hiraditya.
dantrushin requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D93449

Files:
  llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp
  llvm/test/CodeGen/X86/statepoint-vreg-invoke.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D93449.312443.patch
Type: text/x-patch
Size: 10109 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20201217/73235b8d/attachment.bin>


More information about the llvm-commits mailing list