[llvm-dev] Get llvm to optimize through thunk method

Carlo Kok via llvm-dev llvm-dev at lists.llvm.org
Thu Oct 4 01:58:18 PDT 2018


Hi,

is there a way I can tell llvm to optimize through a call to a thunk method?

https://gist.github.com/carlokok/3ba9cb1a36a145a3071a7b901867d442

On line 37 I cast & call _intf__rtti_t27_issue81139__static__dispatchtest_d_Test_vmthelper0 

which is a thunk method that calls 
_intfstub_mi_t27_issue81139__static__dispatchtest_d_Test4_Test 

Is there a way to tell the optimizer to get rid of the thunk call? Since llvm can prove it will end up in _intfstub_mi_t27_issue81139__static__dispatchtest_d_Test4_Test
given the parameters passed?


More information about the llvm-dev mailing list