This is an archive of the discontinued LLVM Phabricator instance.

[Statepoint] Handle `undef` operands in statepoint.
ClosedPublic

Authored by dantrushin on Jan 14 2021, 11:42 AM.

Details

Summary

Currently when spilling statepoint register operands in FixupStatepoints
we do not pay attention that it might be undef. We just generate a
spill, which may lead to verifier error because we have use without a def.

To handle it, let FixupStateponts ignore undef register operands
completely and change them to some constant value when generating
stack map. Use same value as used by ISel for this purpose (0xFEFEFEFE).

Diff Detail

Event Timeline

dantrushin created this revision.Jan 14 2021, 11:42 AM
dantrushin requested review of this revision.Jan 14 2021, 11:42 AM
Herald added a project: Restricted Project. · View Herald TranscriptJan 14 2021, 11:42 AM
reames accepted this revision.Jan 14 2021, 7:41 PM

LGTM w/an MIR test case added before submission.

This revision is now accepted and ready to land.Jan 14 2021, 7:41 PM

Add test case;

This revision was landed with ongoing or failed builds.Jan 18 2021, 4:22 AM
This revision was automatically updated to reflect the committed changes.
arsenm added a subscriber: arsenm.Mar 26 2022, 11:21 AM
arsenm added inline comments.
llvm/lib/CodeGen/StackMaps.cpp
239

What is the intended representation of undef here? This will be replaced later (down at line 485) with ConstantIndex. Why can't this stay as Register?

Herald added a project: Restricted Project. · View Herald TranscriptMar 26 2022, 11:21 AM