<font color="#888888">Hello,<br><br></font>I have been trying to pinpoint the place where the direct/virtual call was decided, however I must admit I failed.<br><br>I have tracked down the two following functions:<br>> canDevirtualizeMemberFunctionCalls  in  CodeGen/CGExprCXX.cpp:108<br>
> canDevirtualizeMemberFunctionCall  in  CodeGen/CGClass.cpp:1625<br><br>which are nigh identical (and I do wonder why there are two of them, with the exact same comments).<br><br>However, even though the first is used, it systematically returns "false" (bottom of the function, after all checks have failed) whether or not the call ends up devirtualized in my test cases.<br>
<br>I was wondering if this optimization, therefore, was realized at IR level (LLVM realizing that the vptr is known statically and thus dereferencing it automatically..., but it does not really looks so).<br><br>I would appreciate if anyone could direct me to the appropriate portion of the code.<br>
<br>-- Matthieu<br>