[PATCH] D77036: [CodeGen] Fix isGCValue utility for statepoint lowering

Denis Antrushin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 30 09:44:23 PDT 2020


dantrushin added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp:486
 
-  auto isGCValue =[&](const Value *V) {
-    return is_contained(SI.Ptrs, V) || is_contained(SI.Bases, V);
-  };
+  auto isGCValue = [&](const Value *V) { return is_contained(SI.GCArgs, V); };
 
----------------
Well, this makes me to ask a question, see below (at lines 497 and 530)...


================
Comment at: llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp:497
   }
   for (unsigned i = 0; i < SI.Bases.size(); ++i) {
     reservePreviousStackSlotForValue(SI.Bases[i], Builder);
----------------
Is it correct that we process `SI.Bases` and `SI.Ptrs` here, not `SI.GCArgs`?


================
Comment at: llvm/lib/CodeGen/SelectionDAG/StatepointLowering.cpp:530
   // (base[0], ptr[0], base[1], ptr[1], ...)
   for (unsigned i = 0; i < SI.Bases.size(); ++i) {
     const Value *Base = SI.Bases[i];
----------------
And here we lower not all GCArgs, but relocated pointers only....


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77036/new/

https://reviews.llvm.org/D77036





More information about the llvm-commits mailing list