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

Kuba (Brecka) Mracek via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 20 15:33:22 PDT 2021


kubamracek added a comment.

Updated diff, should have all comments addressed, added a test for relative pointer vtable.

> could we use getPointerAtOffset here and below instead of recursing further? That way we would only add function pointers that fit the supported Vtable scheme and we should be able to avoid handling arbitrary constants by iterating over their operands, which might lead us to discover function pointers that are not valid VTable entries.

This feels like a weird restriction, and also I think we do need to support arrays/structs in other arrays/structs, so recursing seem like the only option here? The case of a `sub(@fn1, @fn2)` expression seems like not worth protecting against (it's not a "reasonable" valid relative pointer, and arguably it's not even clear whether it should or shouldn't be considered for VFE).


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

https://reviews.llvm.org/D108741



More information about the llvm-commits mailing list