[all-commits] [llvm/llvm-project] 59fb9c: Devirtualize a call on alloca without waiting for ...

hjyamauchi via All-commits all-commits at lists.llvm.org
Wed Feb 26 09:51:47 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 59fb9cde7a4a96fe8485a80d9010e4420ffdca82
      https://github.com/llvm/llvm-project/commit/59fb9cde7a4a96fe8485a80d9010e4420ffdca82
  Author: Hiroshi Yamauchi <yamauchi at google.com>
  Date:   2020-02-26 (Wed, 26 Feb 2020)

  Changed paths:
    M clang/test/CodeGenCXX/member-function-pointer-calls.cpp
    M llvm/lib/Transforms/IPO/Inliner.cpp
    A llvm/test/Transforms/Inline/devirtualize-4.ll

  Log Message:
  -----------
  Devirtualize a call on alloca without waiting for post inline cleanup and next
DevirtSCCRepeatedPass iteration.  Needs ReviewPublic

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.




More information about the All-commits mailing list