[PATCH] D122582: StackMap: Fix assertion on undef operands for anyregc

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 29 18:57:20 PDT 2022


reames added a comment.

JFYI, the original special handling for undef was for diagnostic quality, nothing more.  We wanted a fixed value for undef to avoid arbitrarily complex and broken stackmap entries when the input IR contained undef.  Such stackmaps should be dynamically dead, but having to defer all validation until runtime was non-ideal.  Using a constant value in place of undef gave us a way to constrain how broken the stackmap entries appeared.  As a result, the JIT could meaningfully post-validate a stackmap section and detect errors eagerly.

(This is different than what Denis said above in an subtle way - the signal value does *not* mean "dead pointer".  It's simply a constraint on the structure of a dynamically dead stackmap entry.  Same in practice, slightly different in motivation.)

I think we can use any consistent handling for undef pointers in gc-live list.  (Er, side note: structure of deopt is important, we can't "just drop" a field from it.)

I don't think anyone is using patchpoint.  I suspect the semantics of it have bit rotten enough to be hard to make many reasonable assumptions.  statepoint is in active use.


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

https://reviews.llvm.org/D122582



More information about the llvm-commits mailing list