[PATCH] Support of the gc.relocates for invoke statepoints
Igor Laevsky
igor at azulsystems.com
Thu May 7 08:30:46 PDT 2015
I think a lot of confusion were due to the two mechanisms for recording spilled values locations - one inside StatepointLowering, and one for cross basic block values in FunctionLoweringInfo.
I updated diff so that only one such mechanism is left. Now we record all value locations in "StatepointRelocatedValues" map in FuncitonLoweringInfo.
Also I included statepoint instruction as a key to this map to make it obvious that there could not be any collisions when we allocate different stack sots for the same values in different statepoints. This is not required for correctness, but makes reasoning about correctness a lot easier.
As a side effect "RelocLocations" map is no longer possible to maintain with reasonable effort, so I removed it completely. Anyway it added a lot of complexity while serving only purpose to not emit spill loads for values with non-unique sdvalues. (I.e preventing several spill loads from the same slots) After running some experiments I see that machineCSE is capable to handle such cases for us.
Also after this change it is clear that all structures inside StatepointLowering are used only during call to the "LowerStatepoint" (they are cleared at the beginning of this function). So it will be possible to remove StatepointLowering from SelectionDAG and create it only inside "LowerStatepoint".
REPOSITORY
rL LLVM
http://reviews.llvm.org/D7798
Files:
include/llvm/CodeGen/FunctionLoweringInfo.h
lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
lib/CodeGen/SelectionDAG/StatepointLowering.cpp
lib/CodeGen/SelectionDAG/StatepointLowering.h
test/CodeGen/X86/statepoint-invoke.ll
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7798.25190.patch
Type: text/x-patch
Size: 18865 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150507/538c3efb/attachment.bin>
More information about the llvm-commits
mailing list