llvm/test/Transforms/PGOProfile
Dehao Chen 31ec888106 Add null check for promoted direct call
Summary: We originally assume that in pgo-icp, the promoted direct call will never be null after strip point casts. However, stripPointerCasts is so smart that it could possibly return the value of the function call if it knows that the return value is always an argument. In this case, the returned value cannot cast to Instruction. In this patch, null check is added to ensure null pointer will not be accessed.

Reviewers: tejohnson, xur, davidxl, djasper

Reviewed By: tejohnson

Subscribers: llvm-commits, sanjoy

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312005 91177308-0d34-0410-b5e6-96231b3b80d8
2017-08-29 15:28:12 +00:00
..
Inputs [PGO] Set edge weights for indirectbr instruction with profile counts 2017-08-23 21:36:02 +00:00
X86
branch1.ll
branch2.ll
comdat_internal.ll
comdat_rename.ll
counter_promo_exit_merge.ll
counter_promo_mexits.ll
counter_promo_nest.ll
counter_promo.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 Create PHI node for the return value only when the return value has uses. 2017-08-28 18:57:00 +00:00
icp_covariant_invoke_return.ll
icp_invoke_nouse.ll Create PHI node for the return value only when the return value has uses. 2017-08-28 18:57:00 +00:00
icp_invoke.ll Make ICP uses PSI to check for hotness. 2017-08-08 20:57:33 +00:00
icp_mismatch_msg.ll
icp_sample.ll Add null check for promoted direct call 2017-08-29 15:28:12 +00:00
icp_vararg.ll
indirect_call_annotation.ll
indirect_call_profile.ll
indirect_call_promotion.ll Make ICP uses PSI to check for hotness. 2017-08-08 20:57:33 +00:00
indirectbr.ll [PGO] Set edge weights for indirectbr instruction with profile counts 2017-08-23 21:36:02 +00:00
landingpad.ll
loop1.ll
loop2.ll
memcpy.ll
memop_clone.ll [PGO] Fixed assertion due to mismatched memcpy size type. 2017-08-18 19:17:08 +00:00
memop_size_annotation.ll
memop_size_from_strlen.ll
memop_size_opt_zero.ll
memop_size_opt.ll Keep Optimization Remark Yaml in NewPM 2017-08-20 01:30:45 +00:00
multiple_hash_profile.ll
noreturncall.ll
PR28219.ll
preinline.ll
select1.ll
select2.ll
single_bb.ll
statics_counter_naming.ll
switch.ll
thinlto_indirect_call_promotion.ll Make ICP uses PSI to check for hotness. 2017-08-08 20:57:33 +00:00
thinlto_samplepgo_icp.ll Make ICP uses PSI to check for hotness. 2017-08-08 20:57:33 +00:00
unreachable_bb.ll