[RS4GC] Use one DVCache for both inlineGetBaseAndOffset() and insertParsePoints()
authorYevgeny Rouban <yrouban@azul.com>
Mon, 12 Jul 2021 11:06:06 +0000 (18:06 +0700)
committerYevgeny Rouban <yrouban@azul.com>
Mon, 12 Jul 2021 11:13:00 +0000 (18:13 +0700)
commit88024a724c3bac4aa902dc85d16d3285caac4377
tree44a12d7bde446a672c642bea569f279f03a010f1
parenta95c336b5e3b72def68f75c67f3e5a134d3029e5
[RS4GC] Use one DVCache for both inlineGetBaseAndOffset() and insertParsePoints()

This new test demonstrates a case where a base ptr is generated
twice for the same value: the first one is generated while
the gc.get.pointer.base() is inlined, the second is generated
for the statepoint. This happens because the methods
inlineGetBaseAndOffset() and insertParsePoints() do not share
their defining value cache used by the findBasePointer() method.

Reviewed By: reames
Differential Revision: https://reviews.llvm.org/D103240
llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
llvm/test/Transforms/RewriteStatepointsForGC/intrinsics-bare.ll