[PATCH] D80937: Introduce a "gc-live" bundle for the gc arguments of a statepoint

Denis Antrushin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 2 00:31:22 PDT 2020


dantrushin accepted this revision.
dantrushin added a comment.
This revision is now accepted and ready to land.

LGTM with one note (you can ignore it if you have reasons).



================
Comment at: llvm/lib/IR/Verifier.cpp:4760
+             "gc.relocate: statepoint derived index out of bounds", Call);
+    } else {
+      Assert(0 <= BaseIndex && BaseIndex < (int)StatepointCall.arg_size(),
----------------
BTW, I find this inconsistent with definition of GCRelocateInst.
Its base/derived ptr indices are unsigned and one can successfully create gc.relocate with index in [0, 2^32-1] range.
Then verifier suddenly shrinks allowed range into [0, 2^31-1].
Do you really want enforce index be positive signed int? Why not just require it is smaller (unsigned) than Inputs.size()?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80937





More information about the llvm-commits mailing list