[DAG] Change isGCValue detection for statepoint lowering
authorSerguei Katkov <serguei.katkov@azul.com>
Tue, 31 Mar 2020 09:01:28 +0000 (16:01 +0700)
committerSerguei Katkov <serguei.katkov@azul.com>
Fri, 3 Apr 2020 05:36:13 +0000 (12:36 +0700)
commitbd1d70bf0e17f6d961ae0ca1cafcb12a061836c1
treeb4e84912e4cfe42fea7d5e4456a5d4ce8fa709dc
parentfef2dab100dfc7c49ccf0ce2bacea409324b54ba
[DAG] Change isGCValue detection for statepoint lowering

isGCValue should detect whether the deopt value is a GC pointer.
Currently it checks by finding the value in SI.Bases and SI.Ptrs.
However these data structures contain only those values which
have corresponding gc.relocate call. So we can miss GC value if it
does not have gc.relocate call (dead after the call).

Check GC strategy whether pointer is GC one or consider any pointer
to be GC one conservatively.

Reviewers: reames, dantrushin
Reviewed By: reames
Subscribers: hiraditya, llvm-commits
Differential Revision: https://reviews.llvm.org/D77130
llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp