[PATCH] D108741: [IR][GlobalDCE] Extend !vcall_visibility to be able to specify an offset range that it applies to

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 1 09:14:11 PDT 2021


fhahn added a comment.

In D108741#3098725 <https://reviews.llvm.org/D108741#3098725>, @rjmccall wrote:

> I think Peter is saying that if you can make Clang emit correct ranges for v-tables — specifically so that the ranges don't cover the type_info pointer, which we don't emit enough metadata to safely remove — then you can also go ahead and remove the special case where we only eliminate loads of function pointers.  That's assuming we don't need to support old bitcode.

Can we auto-upgrade the  bitcode, moving the logic to detect the special case in the IR upgrader? IIUC the worst case would be that we won't be able to optimise old bitcode, so it wouldn't be the end of the world. But if we can auto-upgrade to `vcall_visibility` then we should do it I think.

But I don't think we should pull this into this particular patch. I saw @kubamracek already put up D112929 <https://reviews.llvm.org/D112929> and I think the rest of the cleanups (removing the special handling for VFE) should be done as follow-up patches, to avoid making the patch at hand even bigger.


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

https://reviews.llvm.org/D108741



More information about the llvm-commits mailing list