]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
GORI cleanups
authorRichard Biener <rguenther@suse.de>
Tue, 25 Jun 2024 13:41:57 +0000 (15:41 +0200)
committerRichard Biener <rguenth@gcc.gnu.org>
Tue, 25 Jun 2024 14:15:44 +0000 (16:15 +0200)
The following replaces conditional is_export_p calls as is_export_p
handles a NULL bb itself.

* gimple-range-gori.cc (gori_compute::may_recompute_p):
Call is_export_p with NULL bb.

gcc/gimple-range-gori.cc

index 275283a424f0952f6a414bf80ced6452fe163b9e..a31e3be65f797243be1a5f6e1e6b82fa63dc22d9 100644 (file)
@@ -1332,18 +1332,14 @@ gori_compute::may_recompute_p (tree name, basic_block bb, int depth)
          gcc_checking_assert (depth >= 1);
        }
 
-      bool res = (bb ? m_map.is_export_p (dep1, bb)
-                    : m_map.is_export_p (dep1));
+      bool res = m_map.is_export_p (dep1, bb);
       if (res || depth <= 1)
        return res;
       // Check another level of recomputation.
       return may_recompute_p (dep1, bb, --depth);
     }
   // Two dependencies terminate the depth of the search.
-  if (bb)
-    return m_map.is_export_p (dep1, bb) || m_map.is_export_p (dep2, bb);
-  else
-    return m_map.is_export_p (dep1) || m_map.is_export_p (dep2);
+  return m_map.is_export_p (dep1, bb) || m_map.is_export_p (dep2, bb);
 }
 
 // Return TRUE if NAME can be recomputed on edge E.  If any direct dependent