[SampleProfile] Add all callsites to AllCandidates if InlineReplay is in effect
authormodimo <modimo@fb.com>
Wed, 27 Oct 2021 22:59:35 +0000 (15:59 -0700)
committermodimo <modimo@fb.com>
Fri, 29 Oct 2021 19:04:52 +0000 (12:04 -0700)
commit51ce567b38ec92163ec05c9bef0bd0e2bd53c667
treee8d651d86330c0ba51690cf747fdc170e56828ec
parent0ae7bf124a9bca76dd9a91b2f7379168ff13f562
[SampleProfile] Add all callsites to AllCandidates if InlineReplay is in effect

Replay in sample profiling needs to be asked on candidates that may not have counts or below the threshold. If replay is in effect for a function make sure these are captured and also imported during thinLTO.

Testing:
ninja check-all

Reviewed By: wenlei

Differential Revision: https://reviews.llvm.org/D112033
llvm/lib/Transforms/IPO/SampleProfile.cpp
llvm/test/Transforms/SampleProfile/Inputs/csspgo-import-list-no-funca.prof [new file with mode: 0644]
llvm/test/Transforms/SampleProfile/Inputs/csspgo-import-list-replay.txt [new file with mode: 0644]
llvm/test/Transforms/SampleProfile/Inputs/csspgo-import-list.prof
llvm/test/Transforms/SampleProfile/Inputs/function_metadata_replay.txt [new file with mode: 0644]
llvm/test/Transforms/SampleProfile/Inputs/inline-topdown-missing.prof [new file with mode: 0644]
llvm/test/Transforms/SampleProfile/csspgo-import-list.ll
llvm/test/Transforms/SampleProfile/function_metadata.ll
llvm/test/Transforms/SampleProfile/inline-replay.ll