[PATCH] D108741: [IR][GlobalDCE] Add ability to mark vtable methods as eligible for VFE and avoid eliminating non-eligible vfunc in VFE in GlobalDCE

John McCall via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 11 14:43:10 PDT 2021


rjmccall added a comment.

I don't entirely understand the purpose of `vfe_eligible`.  It sounds like it expresses that it's okay for this value to be replaced if we can prove that nothing ever uses it.  Surely that's universally true, albeit usually extremely hard to prove.  So maybe the right general approach is that we should be saying something about the v-table object: that we know certain fields in it are only accessed in specially blessed patterns, and then this `!type` metadata or whatever lets us prove that certain patterns don't exist.  I don't know that a new constant is the best way to express that, as opposed to some sort of metadata on the v-table.  At the very least, maybe that gives us some direction towards a more general name for the constant.


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

https://reviews.llvm.org/D108741



More information about the llvm-commits mailing list