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

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 30 10:49:47 PDT 2020


reames requested changes to this revision.
reames added a comment.
This revision now requires changes to proceed.

Er, I think the specification simplify needs changed here.  As we've discussed offline, it's impossible to enforce having a gc pointer in the deopt list always be in the gc list (in any form).  This was a flaw in the specification from the begging and we should fix the docs, not try to hack up the code to preserve it a bit longer.

The key example of why this can't work:
%p1 = bitcast i8* %p to i8*
statepoint [gc = (%p1)], [deopt = (%p1)]

The optimizer is allowed to replace either use (or both) of %p1 with %p.  If it updates only one of the two (entirely legal), the two sets do not overlap.

If we need to enforce a property for GC values within deopt list, we should directly use the type of the pointer in question.  Anything else appears unsound.


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

https://reviews.llvm.org/D77036





More information about the llvm-commits mailing list