[Inline] Make sure the InlineAdvisor is correctly cleared.
authorMircea Trofin <mtrofin@google.com>
Mon, 11 Oct 2021 23:43:28 +0000 (16:43 -0700)
committerMircea Trofin <mtrofin@google.com>
Tue, 12 Oct 2021 17:42:41 +0000 (10:42 -0700)
commitea4a6c84267fe51c6a0debddf437df37b62ed2d1
tree04d493d34c5e36ace007de1310af868ae6df596f
parentf3ec9d8501c91c22c1578470e638c74120f60667
[Inline] Make sure the InlineAdvisor is correctly cleared.

If another inlining session came after a ModuleInlinerWrapperPass, the
advisor alanysis would still be cached, but its Result would be cleared.
We need to clear both.

This addresses PR52118

Differential Revision: https://reviews.llvm.org/D111586
llvm/include/llvm/Analysis/InlineAdvisor.h
llvm/lib/Transforms/IPO/Inliner.cpp
llvm/test/Other/new-pm-defaults.ll
llvm/test/Other/new-pm-lto-defaults.ll
llvm/test/Other/new-pm-pgo-preinline.ll
llvm/test/Other/new-pm-thinlto-defaults.ll
llvm/test/Other/new-pm-thinlto-postlink-pgo-defaults.ll
llvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll
llvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll
llvm/test/Other/new-pm-thinlto-prelink-samplepgo-defaults.ll
llvm/test/Transforms/Inline/pr52118.ll [new file with mode: 0644]