llvm-project/llvm/lib/Transforms/IPO
Hiroshi Yamauchi f16d2bec40 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
2020-02-28 09:43:32 -08:00
..
AlwaysInliner.cpp [NFC] Refactor InlineResult for readability 2020-01-15 13:34:20 -08:00
ArgumentPromotion.cpp [Attributor] Pointer privatization attribute (argument promotion) 2020-01-29 21:31:04 -06:00
Attributor.cpp [Attributor] Use AssumptionCache in AANonNullFloating::initialize 2020-02-25 13:00:03 +09:00
BarrierNoopPass.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
BlockExtractor.cpp Make llvm::StringRef to std::string conversions explicit. 2020-01-28 23:25:25 +01:00
CMakeLists.txt [OpenMP] Introduce the OpenMPOpt transformation pass 2020-02-08 14:47:03 -06:00
CalledValuePropagation.cpp Add missing includes needed to prune LLVMContext.h include, NFC 2019-11-14 15:23:15 -08:00
ConstantMerge.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
CrossDSOCFI.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
DeadArgumentElimination.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
ElimAvailExtern.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
ExtractGV.cpp [llvm-extract] Add -keep-const-init commandline option 2020-02-03 14:30:28 +09:00
ForceFunctionAttrs.cpp Add missing includes needed to prune LLVMContext.h include, NFC 2019-11-14 15:23:15 -08:00
FunctionAttrs.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
FunctionImport.cpp Revert "Remove redundant "std::move"s in return statements" 2020-02-10 07:07:40 -08:00
GlobalDCE.cpp [WPD/VFE] Always emit vcall_visibility metadata for -fwhole-program-vtables 2020-01-23 11:36:01 -08:00
GlobalOpt.cpp Revert "Recommit "[GlobalOpt] Pass DTU to removeUnreachableBlocks instead of recomputing."" 2020-01-14 14:50:07 +00:00
GlobalSplit.cpp [WPD/VFE] Always emit vcall_visibility metadata for -fwhole-program-vtables 2020-01-23 11:36:01 -08:00
HotColdSplitting.cpp [HotColdSplit] Mark entire function cold when entry block is cold 2020-02-17 15:57:50 -08:00
IPConstantPropagation.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
IPO.cpp [Attributor] Add an Attributor CGSCC pass and run it 2020-02-08 21:27:34 -06:00
InferFunctionAttrs.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
InlineSimple.cpp [Inliner] Inlining should honor nobuiltin attributes 2020-02-28 07:34:14 -08:00
Inliner.cpp Devirtualize a call on alloca without waiting for post inline cleanup and next DevirtSCCRepeatedPass iteration. 2020-02-28 09:43:32 -08:00
Internalize.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
LLVMBuild.txt [OpenMP] Introduce the OpenMPOpt transformation pass 2020-02-08 14:47:03 -06:00
LoopExtractor.cpp [LoopExtractor] Fix legacy pass dependencies 2020-02-12 22:39:21 +02:00
LowerTypeTests.cpp Restore "[WPD/LowerTypeTests] Delay lowering/removal of type tests until after ICP" 2020-02-11 10:48:05 -08:00
MergeFunctions.cpp [NewPM] Port MergeFunctions pass 2020-01-14 20:55:41 +01:00
OpenMPOpt.cpp [OpenMP][Opt] Combine `struct ident_t*` during deduplication 2020-02-25 14:07:14 -08:00
PartialInlining.cpp [Inliner] Inlining should honor nobuiltin attributes 2020-02-28 07:34:14 -08:00
PassManagerBuilder.cpp [LLVM-C] Add bindings for addCoroutinePassesToExtensionPoints 2020-02-24 20:15:51 +01:00
PruneEH.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
SCCP.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
SampleProfile.cpp [Inliner] Inlining should honor nobuiltin attributes 2020-02-28 07:34:14 -08:00
StripDeadPrototypes.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
StripSymbols.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
SyntheticCountsPropagation.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ThinLTOBitcodeWriter.cpp Sink all InitializePasses.h includes 2019-11-13 16:34:37 -08:00
WholeProgramDevirt.cpp Restore "[WPD/LowerTypeTests] Delay lowering/removal of type tests until after ICP" 2020-02-11 10:48:05 -08:00