[PATCH] FIx volatile vs IPA pure/const pass (PR tree-opt/29964)

Andrew Pinski pinskia@gmail.com
Fri Nov 24 18:18:00 GMT 2006


Hi,
  The problem here is that we don't currently see the tree
pointer->field as volatile if the field is volatile as we had already
skipped down to *pointer which is not volatile.  This patch changes
where the check for volatile is and also adds some more debugging output
in the dump to get the result of the local pass.

OK? Bootstrapped and tested on i686-linux-gnu with no regressions.

Thanks,
Andrew Pinski

ChangeLog:

	* ipa-pure-const.c (check_tree): If the original tree
	is volatile return early and say the function is not pure
	nor const.  Remove the volatile check for writes.  
	(analyze_function): Print out the result of the local
	analysis pass.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fixvolatile.diff.txt
Type: text/x-patch
Size: 2536 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20061124/20636209/attachment.bin>


More information about the Gcc-patches mailing list