]> git.ipfire.org Git - thirdparty/gcc.git/commit
ipa-sra: Check also ECF_LOOPING_CONST_OR_PURE when evaluating calls
authorMartin Jambor <mjambor@suse.cz>
Wed, 1 Dec 2021 13:25:16 +0000 (14:25 +0100)
committerMartin Jambor <mjambor@suse.cz>
Wed, 1 Dec 2021 13:27:04 +0000 (14:27 +0100)
commitd2ecc42195e8af1992d12e678e761c73557eaf56
tree127f7d98f22ee465e09e4876611aff4a8bcf9e9f
parent5c15b59b59679518d3f05e6be4c425626d8509c0
ipa-sra: Check also ECF_LOOPING_CONST_OR_PURE when evaluating calls

in PR 103267 Honza found out that IPA-SRA does not look at
ECF_LOOPING_CONST_OR_PURE when evaluating if a call can have side
effects.  Fixed with this patch.  The testcase infinitely loops in a
const function, so it would not make a good addition to the testsuite.

gcc/ChangeLog:

2021-11-29  Martin Jambor  <mjambor@suse.cz>

PR ipa/103267
* ipa-sra.c (scan_function): Also check ECF_LOOPING_CONST_OR_PURE flag.

(cherry picked from commit e5440bc08e07fd491dcccd47e1b86a5985ee117c)
gcc/ipa-sra.c