Page MenuHomePhabricator

[DAG] Change isGCValue detection for statepoint lowering

Authored by skatkov on Mar 31 2020, 3:48 AM.



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.

Diff Detail

Event Timeline

skatkov created this revision.Mar 31 2020, 3:48 AM
reames requested changes to this revision.Apr 1 2020, 7:17 PM
reames added inline comments.

Minor improvement:
if (V->getType()->isPtrOrPtrVectorTy()) {

if (auto IsManaged = GFI->getStrategy().isGCManagedPointer(Ty))
  return *IsManaged;

return true; // conservative

This revision now requires changes to proceed.Apr 1 2020, 7:17 PM
skatkov updated this revision to Diff 254429.Apr 1 2020, 10:41 PM
skatkov edited the summary of this revision. (Show Details)

Philip, thank you for your suggestion.

reames accepted this revision.Apr 2 2020, 8:56 AM


This revision is now accepted and ready to land.Apr 2 2020, 8:56 AM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptApr 2 2020, 10:45 PM