[Statepoints] Fix yet another issue around gc pointer uniqueing
authorSanjoy Das <sanjoy@playingwithpointers.com>
Thu, 24 Mar 2016 18:57:39 +0000 (18:57 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Thu, 24 Mar 2016 18:57:39 +0000 (18:57 +0000)
commitc0c59fe14ea324d69a09d12bf2de2f543b990ac2
tree906f829b715e0c0b8f2f151046d449a4a2c3789a
parent42f91a995960b13dc2a661381e1e18b226d18cea
[Statepoints] Fix yet another issue around gc pointer uniqueing

Given that StatepointLowering now uniques derived pointers before
putting them in the per-statepoint spill map, we may end up with missing
entries for derived pointers when we visit a gc.relocate on a pointer
that was de-duplicated away.

Fix this by keeping two maps, one mapping gc pointers to their
de-duplicated values, and one mapping a de-duplicated value to the slot
it is spilled in.

llvm-svn: 264320
llvm/include/llvm/CodeGen/FunctionLoweringInfo.h
llvm/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp
llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp
llvm/test/CodeGen/X86/statepoint-uniqueing.ll [moved from llvm/test/CodeGen/X86/statepoint-duplicate-gcrelocate.ll with 50% similarity]