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

David Li via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 19 22:35:42 PDT 2023


david-xl wrote:

> Haven't looked at the changes, but from the conversations above this looks like a useful change. Though I think the big picture context/motivation can go into the change summary to help others understand better. Maybe even a small RFC would be helpful to explain the complete plan you have.
> 
> > combined with more aggressive interprocedural type propagation that enables full (unconditional) devirtualization
> 
> Today LLVM doesn't have inter-procedural type propagation yet, right? or is this something you started working on now?

This is part of the plan -- the first stage is the producer related, and type prop is one possible consumer.  

Static type propagation (without VPT) tries to prop type from object creation site to uses -- it can be quite limited due to merging effect.  Another static method is to do virtual function cloning (a clone is a function which the runtime type is known  that can be propagated) and vtable of the owner type will be updated with the clones. The downside is potential large code bloat.

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


More information about the llvm-commits mailing list