[RS4GC] Fix algorithm to avoid setting vector BDV for scalar derived pointer""
authorAnna Thomas <anna@azul.com>
Thu, 14 May 2020 14:17:12 +0000 (10:17 -0400)
committerAnna Thomas <anna@azul.com>
Thu, 14 May 2020 15:17:45 +0000 (11:17 -0400)
commiteb282be9f8e96053dc7dda687cd0608997810ccf
tree95ec2406ca5d9df1f66af716dec3f027a9e283df
parent29560a89ddcaf3af9b8a73d98d968a0911d21e27
[RS4GC] Fix algorithm to avoid setting vector BDV for scalar derived pointer""

This is relanding of rGbb308b020522420413c7d3f2989a88f2fc423c56 after
speculatively fixing buildbot lit test failure which was seen on two
bots (I cannot reproduce the lit test failure locally either).

[RS4GC] Fix algorithm to avoid setting vector BDV for scalar derived
pointer

Summary:
This is a more general fix to 59029b9eef23 (D75704).
This patch does the following:

updates isKnownBaseValue to account for base pointer and
derived pointer having differing types.

This inturn allows us to populate the
lattice (States) for such derived pointers.

It also updates all states where the base and derived pointers have
differing types (vector versus scalar) and conservatively marks these
states as conflictcs.
Note that in 59029b9eef23, we were just fixing existing lattice values
and that too, only for uses of extractelement.

Reviewers: reames, skatkov, dantrushin

Reviewed By: skatkov

Subscribers: hiraditya, llvm-commits

Differential Revision: https://reviews.llvm.org/D76305
llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
llvm/test/Transforms/RewriteStatepointsForGC/scalar-base-vector.ll