This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix ipa-pure-const wrt clobbers


Just noticed the following - oddly no testsuite regressions because
of this ...

Richard.

2012-01-27  Richard Guenther  <rguenther@suse.de>

	* ipa-pure-const.c (check_stmt): Clobbers do not make a
	function non-const/pure.

Index: gcc/ipa-pure-const.c
===================================================================
*** gcc/ipa-pure-const.c	(revision 183616)
--- gcc/ipa-pure-const.c	(working copy)
*************** check_stmt (gimple_stmt_iterator *gsip,
*** 652,658 ****
        print_gimple_stmt (dump_file, stmt, 0, 0);
      }
  
!   if (gimple_has_volatile_ops (stmt))
      {
        local->pure_const_state = IPA_NEITHER;
        if (dump_file)
--- 652,659 ----
        print_gimple_stmt (dump_file, stmt, 0, 0);
      }
  
!   if (gimple_has_volatile_ops (stmt)
!       && !gimple_clobber_p (stmt))
      {
        local->pure_const_state = IPA_NEITHER;
        if (dump_file)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]