From 3991912e260d68f0da8d3711b5258c3a3009dc4c Mon Sep 17 00:00:00 2001 From: Jan Hubicka Date: Sat, 26 Sep 2020 18:40:50 +0200 Subject: Fix handling of clobbers in ipa-modref.c * ipa-modref.c (analyze_stmt): Do not skip clobbers in early pass. * ipa-pure-const.c (analyze_stmt): Update comment. --- gcc/ipa-pure-const.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'gcc/ipa-pure-const.c') diff --git a/gcc/ipa-pure-const.c b/gcc/ipa-pure-const.c index bdbccd0..1af3206 100644 --- a/gcc/ipa-pure-const.c +++ b/gcc/ipa-pure-const.c @@ -742,6 +742,8 @@ check_stmt (gimple_stmt_iterator *gsip, funct_state local, bool ipa) /* Do consider clobber as side effects before IPA, so we rather inline C++ destructors and keep clobber semantics than eliminate them. + Similar logic is in ipa-modref. + TODO: We may get smarter during early optimizations on these and let functions containing only clobbers to be optimized more. This is a common case of C++ destructors. */ -- cgit v1.1