[llvm] [IRPGO][ValueProfile] Instrument virtual table address that could be used to do virtual table address comparision for indirect-call-promotion. (PR #66825)

via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 20 15:21:05 PDT 2023


modiking wrote:

Interesting work! On my side I was thinking about a different approach using existing profiling and the whole program devirtualization (WPD) framework:
1. Existing profiling identifies what targets an indirect call goes to
2. With WPD information, we can identify if the targets are member function
3. If this is a member function unique to a single vtable then we can elide the second load and be functionally equivalent

Directly value profiling the vtable captures more opportunities where the member function can exist in more than 1 vtable however getting that information in sample profiling is trickier which makes the previous approach more appealing.

https://github.com/llvm/llvm-project/pull/66825


More information about the llvm-commits mailing list