[PATCH] D109114: [GlobalDCE] In VFE, replace the whole 'sub' expression of unused relative-pointer-based vtable slots
Kuba (Brecka) Mracek via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 17 21:22:32 PDT 2021
kubamracek updated this revision to Diff 373388.
kubamracek added a comment.
> Would it be possible to either only iterate over all users if we know that there are relative pointers or iterate over all uses once and either replace the sub with zero or the use with nullptr?
Attempted to do this, but it complicates the implementation. Not sure if the extra complexity is worth it (we only save an extra iteration over vtables, and presumably in realistic programs that's a limited amount of those).
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109114/new/
https://reviews.llvm.org/D109114
Files:
llvm/lib/Transforms/IPO/GlobalDCE.cpp
llvm/test/Transforms/GlobalDCE/virtual-functions-derived-call.ll
llvm/test/Transforms/GlobalDCE/virtual-functions-derived-pointer-call.ll
llvm/test/Transforms/GlobalDCE/virtual-functions-relative-pointers-bad.ll
llvm/test/Transforms/GlobalDCE/virtual-functions-relative-pointers-gep.ll
llvm/test/Transforms/GlobalDCE/virtual-functions-relative-pointers.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109114.373388.patch
Type: text/x-patch
Size: 7104 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210918/a48df548/attachment.bin>
More information about the llvm-commits
mailing list