[PATCH] D108741: [GlobalDCE] Handle non-vfunc entries in vtables during VFE

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 13 16:26:58 PDT 2021


tejohnson added a comment.

In D108741#2997844 <https://reviews.llvm.org/D108741#2997844>, @fhahn wrote:

>> As part of codesize optimization work for Swift, we'd like to add Virtual Function Elimination to Swift, very similarly to how GlobalDCE supports C++ VFE.
>
> I think it would be good to drop this part from the description, as the change is not really related to swift; it just changes the code to ignore entries at slots without `!type`.
>
> It seems sensible to me to ignore entries without corresponding `!type` metadata  and this should be in line with the specification in langref. @pcc, @tejohnson Are there any issues you could think of?

Is this specified in the langref? I looked through the type metadata documentation but don't see it mentioned there that all vfuncs will have type metadata. Looks like that was added a bit later than the original type metadata, in D47567 <https://reviews.llvm.org/D47567>. I think what is specified in langref is that it has type metadata for the address point. Probably the documentation needs updating. But from what I can see, it looks like this should always be emitted now. @pcc ?


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

https://reviews.llvm.org/D108741



More information about the llvm-commits mailing list