Are there any plans for adding an llvm.expect overload that works on pointers?
It could then be used to pass information that can be used for Indirect Call Promotion (without profiling).
%6 = load void ()*, ... %7 = call llvm.expect(%6, @hot_function) call void %7()
which can then be transformed into
%6 = load void ()*, ... call void %6() !prof !1
!prof !1 refers to appropriate value profiling information. And from there, the ICP pass takes over.
Thanks for your comments,