This is an archive of the discontinued LLVM Phabricator instance.

MIR Statepoint refactoring: pass GC pointers in VRegs. Part 1/5.
AbandonedPublic

Authored by dantrushin on May 19 2020, 1:18 AM.

Details

Summary

Introduce new SelectionDAG node, StatepointSDNode, which captures
return value of original call and use it in place of MachineSDNode
used for statepoint lowering.
This lays ground for further changes and is NFC.

Diff Detail

Event Timeline

dantrushin created this revision.May 19 2020, 1:18 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 19 2020, 1:18 AM
reames requested changes to this revision.May 29 2020, 12:17 PM

Please pull out a purely NFC patch without any of the first-N-vregs bits which is purely functional. (i.e. replaces the existing target node with the generic node, introduces the node type and wrapper class, but does nothing else.)

The split point chosen here doesn't work. You're introducing untested and unused code. That's not okay.

This revision now requires changes to proceed.May 29 2020, 12:17 PM
dantrushin updated this revision to Diff 267647.Jun 1 2020, 9:31 AM

Rework patch accodring to comments: Replace existing MachineSDNode with
newly introduced StatepointSDNode and use it for statepoint lowering.
No functional changes.

dantrushin edited the summary of this revision. (Show Details)Jun 1 2020, 9:34 AM
reames requested changes to this revision.Jun 1 2020, 9:48 AM

Let's discuss offline.

llvm/include/llvm/CodeGen/ISDOpcodes.h
1072

The [Relocates,] part isn't yet present. Remove before commit, readd in relevant follow up.

llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp
751

How is it safe not to have memrefs on the node here? Maybe some discussion offline?

802

Please revert this part for now. I'm not sure it's wrong, but I'd like to reduce the scope and audit only this part in it's own change.

This revision now requires changes to proceed.Jun 1 2020, 9:48 AM
dantrushin marked an inline comment as done.Jun 1 2020, 10:07 AM
dantrushin added inline comments.
llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp
751

I simply have no space to put them into StatepointSDNode.
(They are part of MachineSDNode). So I add them in InstructionEmitter.

dantrushin abandoned this revision.Jun 11 2020, 5:13 AM

Adandoned in favor of D81648