]> git.ipfire.org Git - thirdparty/gcc.git/commit
ipa-sra: Consider the first parameter of methods safe to dereference
authorMartin Jambor <mjambor@suse.cz>
Wed, 14 Dec 2022 18:01:11 +0000 (19:01 +0100)
committerMartin Jambor <mjambor@suse.cz>
Wed, 14 Dec 2022 18:08:58 +0000 (19:08 +0100)
commit0e9495303db062cf118869b7526132b5821833e9
treed3b8e817445c867426a3af1017f24bac6c744103
parent6539bbc14836b8e0fa08944be2c069b58bed9455
ipa-sra: Consider the first parameter of methods safe to dereference

Honza requested this after reviewing the patch that taught IPA-SRA
that REFERENCE_TYPEs are always non-NULL that the pass also handles
the first parameters of methods, this pointers, in the same way.  So
this patch does that.

gcc/ChangeLog:

2022-12-14  Martin Jambor  <mjambor@suse.cz>

* ipa-sra.cc (create_parameter_descriptors): Consider the first
parameter of a method safe to dereference.

gcc/testsuite/ChangeLog:

2022-12-14  Martin Jambor  <mjambor@suse.cz>

* g++.dg/ipa/ipa-sra-6.C: New test.
gcc/ipa-sra.cc
gcc/testsuite/g++.dg/ipa/ipa-sra-6.C [new file with mode: 0644]