[PATCH] D76305: [RS4GC] Fix algorithm to avoid setting vector BDV for scalar derived pointer
Denis Antrushin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 19 07:32:11 PDT 2020
dantrushin added a comment.
I hoped Philip will review this, because I'm not very familiar with this part of RS4GC and I have couple quetions here, see inline.
================
Comment at: llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp:641
/// is it known to be a base pointer? Or do we need to continue searching.
-static bool isKnownBaseResult(Value *V) {
+static bool isKnownBaseResult(Value *V, Value *Input) {
if (!isa<PHINode>(V) && !isa<SelectInst>(V) &&
----------------
Is `Input` a derived pointer here for which we check if `V` is a base of?.. Or vice versa?
================
Comment at: llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp:884
Value *BDV = Pair.first;
- assert(!isKnownBaseResult(BDV) && "why did it get added?");
+ assert(!isKnownBaseResult(BDV, Pair.second.getBaseValue()) &&
+ "why did it get added?");
----------------
Here I am confused.
Isn't `Pair.second.getBaseValue()` supposed to be base value for `BDV`? And we're asking the other way?
Same question for lines 944, 977 and few more below.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D76305/new/
https://reviews.llvm.org/D76305
More information about the llvm-commits
mailing list