[PATCH] D98393: [Statepoint Lowering] Handle the case with several gc.result

Serguei Katkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 10 22:48:55 PST 2021


skatkov created this revision.
skatkov added reviewers: dantrushin, reames.
Herald added subscribers: dexonsmith, pengfei, hiraditya.
skatkov requested review of this revision.
Herald added a project: LLVM.

Recently gc.result has been marked with readnone instead of readonly and
this opens a door for different optimization to duplicate gc.result.
Statepoint lowering is not ready to see several gc.results.
The problem appears when there are gc.results with one located in the same
basic block and another located in other basic block.
In this case we need both export VR and fill local setValue.

Note that this case is not sufficient optimization done before CodeGen.
It is evident that local gc.result dominates all other gc.results and it is handled
by GVN and EarlyCSE.

But anyway, even if IR is not optimal Backend should not crash on a valid IR.


https://reviews.llvm.org/D98393

Files:
  llvm/include/llvm/IR/Statepoint.h
  llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp
  llvm/test/CodeGen/X86/statepoint-two-results.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98393.329848.patch
Type: text/x-patch
Size: 4591 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210311/7a921855/attachment.bin>


More information about the llvm-commits mailing list