<div dir="ltr">I have implemented indirect call value profiling in LDC, using Clang's code for inspiration, and it appears to work great. An often recurring indirect call is nicely promoted to a comparison and a direct call (I am using a modified LLVM with the indirect call promotion pass added).<div>However, I am wondering if I can go one step further: instead of indexing into a vtable and doing the comparison on the function address, profile the vtable pointer and do the comparison on the vtable pointer.<div>Does LLVM have support for this already, or do I have to code this myself?</div><div>Or perhaps I am dreaming and this doesn't make sense?</div><div><br></div><div>Kind regards,</div><div>  Johan</div><div><br></div></div></div>