Re: [PATCH, PR tree-optimization/65002] Disable SRA for functions wrongly marked as read-only

2015-02-16 Thread Ilya Enkovich
2015-02-15 20:25 GMT+03:00 Mike Stump mikest...@comcast.net: On Feb 13, 2015, at 11:25 AM, Jakub Jelinek ja...@redhat.com wrote: 2015-02-12 Ilya Enkovich ilya.enkov...@intel.com PR tree-optimization/65002 * gcc.dg/pr65002.C: New. This test should have gone into g++.dg. Into

Re: [PATCH, PR tree-optimization/65002] Disable SRA for functions wrongly marked as read-only

2015-02-15 Thread Mike Stump
On Feb 13, 2015, at 11:25 AM, Jakub Jelinek ja...@redhat.com wrote: 2015-02-12 Ilya Enkovich ilya.enkov...@intel.com PR tree-optimization/65002 * gcc.dg/pr65002.C: New. This test should have gone into g++.dg. Into g++.dg/opt or g++.dg/ipa in particular. Pre-approved if

Re: [PATCH, PR tree-optimization/65002] Disable SRA for functions wrongly marked as read-only

2015-02-13 Thread Richard Biener
On Thu, Feb 12, 2015 at 3:14 PM, Ilya Enkovich enkovich@gmail.com wrote: Hi, PR65002 is the second issue caused by SRA for functions wrongly marked as read-only. Previous fix for PR64353 doesn't work for this case because SSA update happens too late. Here is a patch to disable SRA for

Re: [PATCH, PR tree-optimization/65002] Disable SRA for functions wrongly marked as read-only

2015-02-13 Thread Jakub Jelinek
On Fri, Feb 13, 2015 at 09:47:56AM +0100, Richard Biener wrote: 2015-02-12 Ilya Enkovich ilya.enkov...@intel.com PR tree-optimization/65002 * tree-cfg.c (pass_data_fixup_cfg): Don't update SSA on start. * tree-sra.c (some_callers_have_no_vuse_p): New.

Re: [PATCH, PR tree-optimization/65002] Disable SRA for functions wrongly marked as read-only

2015-02-13 Thread Ilya Enkovich
2015-02-13 11:54 GMT+03:00 Jakub Jelinek ja...@redhat.com: On Fri, Feb 13, 2015 at 09:47:56AM +0100, Richard Biener wrote: 2015-02-12 Ilya Enkovich ilya.enkov...@intel.com PR tree-optimization/65002 * tree-cfg.c (pass_data_fixup_cfg): Don't update SSA on start.

Re: [PATCH, PR tree-optimization/65002] Disable SRA for functions wrongly marked as read-only

2015-02-13 Thread Richard Biener
On Fri, Feb 13, 2015 at 9:54 AM, Jakub Jelinek ja...@redhat.com wrote: On Fri, Feb 13, 2015 at 09:47:56AM +0100, Richard Biener wrote: 2015-02-12 Ilya Enkovich ilya.enkov...@intel.com PR tree-optimization/65002 * tree-cfg.c (pass_data_fixup_cfg): Don't update

Re: [PATCH, PR tree-optimization/65002] Disable SRA for functions wrongly marked as read-only

2015-02-13 Thread Jakub Jelinek
On Fri, Feb 13, 2015 at 10:21:42AM +0100, Richard Biener wrote: I wonder if this won't pessimize const functions that just get called with aggregate arguments passed by value, do those count as memory read or just as parameters? They count as memory reads and thus cause a VUSE (similar to

Re: [PATCH, PR tree-optimization/65002] Disable SRA for functions wrongly marked as read-only

2015-02-13 Thread Marek Polacek
On Thu, Feb 12, 2015 at 05:14:19PM +0300, Ilya Enkovich wrote: Hi, PR65002 is the second issue caused by SRA for functions wrongly marked as read-only. Previous fix for PR64353 doesn't work for this case because SSA update happens too late. Here is a patch to disable SRA for such

Re: [PATCH, PR tree-optimization/65002] Disable SRA for functions wrongly marked as read-only

2015-02-13 Thread Jakub Jelinek
On Fri, Feb 13, 2015 at 08:19:52PM +0100, Marek Polacek wrote: On Thu, Feb 12, 2015 at 05:14:19PM +0300, Ilya Enkovich wrote: Hi, PR65002 is the second issue caused by SRA for functions wrongly marked as read-only. Previous fix for PR64353 doesn't work for this case because SSA

[PATCH, PR tree-optimization/65002] Disable SRA for functions wrongly marked as read-only

2015-02-12 Thread Ilya Enkovich
Hi, PR65002 is the second issue caused by SRA for functions wrongly marked as read-only. Previous fix for PR64353 doesn't work for this case because SSA update happens too late. Here is a patch to disable SRA for such functions to avoid inconsistent SSA issues. Bootstrapped and tested on