Devirtualize a call on alloca without waiting for post inline cleanup and next...
Devirtualize a call on alloca without waiting for post inline cleanup and next DevirtSCCRepeatedPass iteration. This aims to fix a missed inlining case. If there's a virtual call in the callee on an alloca (stack allocated object) in the caller, and the callee is inlined into the caller, the post-inline cleanup would devirtualize the virtual call, but if the next iteration of DevirtSCCRepeatedPass doesn't happen (under the new pass manager), which is based on a heuristic to determine whether to reiterate, we may miss inlining the devirtualized call. This enables inlining in clang/test/CodeGenCXX/member-function-pointer-calls.cpp. This is a second commit after a revert https://reviews.llvm.org/rG4569b3a86f8a4b1b8ad28fe2321f936f9d7ffd43 and a fix https://reviews.llvm.org/rG41e06ae7ba91. Differential Revision: https://reviews.llvm.org/D69591
Loading
Please register or sign in to comment