[PATCH] D75598: [InstCombine] Handle gc.relocate(null) in one iteration

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 4 16:23:22 PST 2020


reames added a comment.

I don't think this is quite the right factoring, for two reasons:

1. This applies to the other gc_relocate transforms as well (e.g. undef, non-null, etc..)
2. This applies in the other direction to a chain of dead gc.relocates.  (Actually, it looks like we don't recurse the chain at all?)

I'm not sure on the right approach here.  One idea would be to add a gc_statepoint case to the intrinsic switch and phrase many of these transforms as a change to the statepoint operand list.  (i.e. we can remove null, undef, and duplicate entries and thus have to renumber gc.relocates.)

One way to think about it is that the "statepoint" is really the whole sequence.  And as a result, we're not doing a transform on one instruction at a time, but the whole "unit" of instructions.  Not sure I really like that though.


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

https://reviews.llvm.org/D75598





More information about the llvm-commits mailing list