[PATCH] D69591: Devirtualize a call on alloca without waiting for post inline cleanup and next DevirtSCCRepeatedPass iteration.

Hiroshi Yamauchi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 29 15:38:29 PDT 2019


yamauchi created this revision.
yamauchi added a reviewer: davidxl.
Herald added subscribers: hiraditya, eraman, Prazek.
Herald added a project: LLVM.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D69591

Files:
  llvm/lib/Analysis/Loads.cpp
  llvm/lib/Transforms/IPO/Inliner.cpp
  llvm/test/Transforms/Inline/devirtualize-4.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69591.226982.patch
Type: text/x-patch
Size: 12215 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191029/3f5c23e5/attachment.bin>


More information about the llvm-commits mailing list