diff mbox

[PR,tree-optimization/79007,tree-optimization/67955] Don't be so conservative with pt.null

Message ID 4e3184e2-a8dc-7e43-50a4-149f03107602@redhat.com
State New
Headers show

Commit Message

Jeff Law Jan. 9, 2017, 9:55 p.m. UTC
Per the discussion with Richi.  Bootstrapped and regression tested on 
x86_64-linux-gnu.  Though I thought I'd done the same with the prior 
patch, but it clearly was making the new dse-points-to test fail everywhere.

Installed on the trunk.

Jeff
commit 18c5f2e1d38dfd248f7d17eb9656251191a8bd15
Author: law <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Date:   Mon Jan 9 21:53:02 2017 +0000

    	PR tree-optimization/79007
    	PR tree-optimization/67955
    	* tree-ssa-alias.c (same_addr_size_stores_p): Only need to be
    	conservative for pt.null when flag_non_call_exceptions is on.
    
    git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@244247 138bc75d-0d04-0410-961f-82ee72b054a4
diff mbox

Patch

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 76cb51b..ed75ea8 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,10 @@ 
+2017-01-04  Jeff Law  <law@redhat.com>
+
+	PR tree-optimization/79007
+	PR tree-optimization/67955
+	* tree-ssa-alias.c (same_addr_size_stores_p): Only need to be
+	conservative for pt.null when flag_non_call_exceptions is on.
+
 2017-01-09  Jakub Jelinek  <jakub@redhat.com>
 
 	PR translation/79019
diff --git a/gcc/tree-ssa-alias.c b/gcc/tree-ssa-alias.c
index 871fa12..83fa6f5 100644
--- a/gcc/tree-ssa-alias.c
+++ b/gcc/tree-ssa-alias.c
@@ -2373,9 +2373,9 @@  same_addr_size_stores_p (tree base1, HOST_WIDE_INT offset1, HOST_WIDE_INT size1,
       || !pt_solution_singleton_or_null_p (&pi->pt, &pt_uid))
     return false;
 
-  /* If the solution has a singleton and NULL, then we can not
-     be sure that the two stores hit the same address.  */
-  if (pi->pt.null)
+  /* Be conservative with non-call exceptions when the address might
+     be NULL.  */
+  if (flag_non_call_exceptions && pi->pt.null)
     return false;
 
   /* Check that ptr points relative to obj.  */