hanchenye-llvm-project/llvm/test/Transforms/PGOProfile
Taewook Oh 923c216da5 [ICP] Do not attempt type matching for variable length arguments.
Summary:
When performing indirect call promotion, current implementation inspects "all" parameters of the callsite and attemps to match with the formal argument type of the callee function. However, it is not possible to find the type for variable length arguments, and the compiler crashes when it attemps to match the type for variable lenght argument.

It seems that the bug is introduced with D40658. Prior to that, the type matching is performed only for the parameters whose ID is less than callee->getFunctionNumParams(). The attached test case will crash without the patch.

Reviewers: mssimpso, davidxl, davide

Reviewed By: mssimpso

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D46026

llvm-svn: 330844
2018-04-25 17:19:21 +00:00
..
Inputs
X86
PR28219.ll
branch1.ll
branch2.ll
comdat_internal.ll
comdat_rename.ll
counter_promo.ll
counter_promo_exit_merge.ll
counter_promo_mexits.ll
counter_promo_nest.ll
criticaledge.ll
diag_FE_profile.ll
diag_mismatch.ll
diag_no_funcprofdata.ll
diag_no_profile.ll
do-not-instrument.ll
icp_covariant_call_return.ll
icp_covariant_invoke_return.ll
icp_invoke.ll
icp_invoke_nouse.ll
icp_mismatch_msg.ll
icp_sample.ll
icp_vararg.ll
indirect_call_annotation.ll
indirect_call_profile.ll
indirect_call_promotion.ll
indirect_call_promotion_vla.ll
indirectbr.ll
infinite_loop.ll
infinite_loop_gen.ll
irreducible.ll
landingpad.ll
large_count_remarks.ll
loop1.ll
loop2.ll
memcpy.ll
memop_clone.ll
memop_size_annotation.ll
memop_size_from_strlen.ll
memop_size_opt.ll
memop_size_opt_zero.ll
multiple_hash_profile.ll
noreturncall.ll
preinline.ll
select1.ll
select2.ll
single_bb.ll
split-indirectbr-critical-edges.ll
statics_counter_naming.ll
switch.ll
thinlto_indirect_call_promotion.ll
thinlto_samplepgo_icp.ll
thinlto_samplepgo_icp2.ll
thinlto_samplepgo_icp3.ll
thinlto_samplepgo_icp_droppeddead.ll
unreachable_bb.ll