[PATCH] D124444: Only export STATEPOINT results if used in nonlocal blocks.
Philip Reames via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 26 08:10:14 PDT 2022
reames added inline comments.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp:898
+ assert(LowerAsVReg.find(SD) != LowerAsVReg.end() && "not found");
+ NodeMap[Relocate] = SDValue(StatepointMCNode, LowerAsVReg[SD]);
+ continue;
----------------
The idiomatic way to manipulate NodeMap is via setValue. Please use that.
See also comment about placement below.
================
Comment at: llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp:1222
+ if (NodeMap.find(&Relocate) != NodeMap.end()) {
+ assert(Relocate.getStatepoint()->getParent() == Relocate.getParent() &&
----------------
I believe it would be much more idiomatic to recognize that the gc.relocate is local here, and directly setValue the appropriate statepoint result. I'm not really sure what the implications of calling setValue in the "wrong" spot are either.
This would essentially require adding a new state to the record.type field, and handling local cases explicitly.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D124444/new/
https://reviews.llvm.org/D124444
More information about the llvm-commits
mailing list