commit:     b48789c0fbdc87c1fc7534717d15fe9fb622f283
Author:     Michael Mair-Keimberger <mmk <AT> levelnine <DOT> at>
AuthorDate: Wed Apr 12 18:43:47 2023 +0000
Commit:     Sam James <sam <AT> gentoo <DOT> org>
CommitDate: Fri Apr 14 01:05:05 2023 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b48789c0

sys-devel/gcc: remove unused patches

Signed-off-by: Michael Mair-Keimberger <mmk <AT> levelnine.at>
Closes: https://github.com/gentoo/gentoo/pull/30573
Signed-off-by: Sam James <sam <AT> gentoo.org>

 ...R109265_PR109274_PR109325_range_def_chain.patch | 219 ---------------------
 ...3.0.1_pre20230402-PR109304-ICE-python3.12.patch |  72 -------
 2 files changed, 291 deletions(-)

diff --git 
a/sys-devel/gcc/files/gcc-13.0.1_pre20230326-76_all_all_PR109265_PR109274_PR109325_range_def_chain.patch
 
b/sys-devel/gcc/files/gcc-13.0.1_pre20230326-76_all_all_PR109265_PR109274_PR109325_range_def_chain.patch
deleted file mode 100644
index bd66ce422cff..000000000000
--- 
a/sys-devel/gcc/files/gcc-13.0.1_pre20230326-76_all_all_PR109265_PR109274_PR109325_range_def_chain.patch
+++ /dev/null
@@ -1,219 +0,0 @@
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109265
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109274
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109325
-https://bugs.gentoo.org/903505
-https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=dd63bba0c8dc3a6ae06cfdc084bca7c68b8bbd39
-
-From dd63bba0c8dc3a6ae06cfdc084bca7c68b8bbd39 Mon Sep 17 00:00:00 2001
-From: Andrew MacLeod <amacl...@redhat.com>
-Date: Fri, 24 Mar 2023 11:21:20 -0400
-Subject: [PATCH] Fix compute_operand when op1 == op2 symbolically.
-
-First, class value_relation should not sanitize records. just create
-what is asked.
-
-Second., if there is not a relation record, compute_operand was
-creating one for op1 == op2 if op1 and op2 were the same symbol.   This
-is not the correct way to communicate the information, as that record
-will continue to be passed along the GORI unwind chain.
-
-Instead, simply pass that information locally to the opX_range routine
-for only the current statement.
-
-       PR tree-optimization/109265
-       PR tree-optimization/109274
-       gcc/
-       * gimple-range-gori.cc (gori_compute::compute_operand_range): Do
-       not create a relation record is op1 and op2 are the same symbol.
-       (gori_compute::compute_operand1_range): Pass op1 == op2 to the
-       handler for this stmt, but create a new record only if this statement
-       generates a relation based on the ranges.
-       (gori_compute::compute_operand2_range): Ditto.
-       * value-relation.h (value_relation::set_relation): Always create the
-       record that is requested.
-
-       gcc/testsuite/
-       * gcc.dg/pr109274.c: New.
-       * gfortran.dg/pr109265.f90: New.
---- a/gcc/gimple-range-gori.cc
-+++ b/gcc/gimple-range-gori.cc
-@@ -623,21 +623,6 @@ gori_compute::compute_operand_range (vrange &r, gimple 
*stmt,
-   tree op1 = gimple_range_ssa_p (handler.operand1 ());
-   tree op2 = gimple_range_ssa_p (handler.operand2 ());
- 
--  // If there is a relation, use it instead of any passed in.  This will allow
--  // multiple relations to be processed in compound logicals.
--  if (op1 && op2)
--    {
--      relation_kind k = handler.op1_op2_relation (lhs);
--      // If there is no relation, and op1 == op2, create a relation.
--      if (!vrel_ptr && k == VREL_VARYING && op1 == op2)
--      k = VREL_EQ;
--      if (k != VREL_VARYING)
--       {
--       vrel.set_relation (k, op1, op2);
--       vrel_ptr = &vrel;
--       }
--    }
--
-   // Handle end of lookup first.
-   if (op1 == name)
-     return compute_operand1_range (r, handler, lhs, name, src, vrel_ptr);
-@@ -1093,6 +1078,7 @@ gori_compute::compute_operand1_range (vrange &r,
-                                     const vrange &lhs, tree name,
-                                     fur_source &src, value_relation *rel)
- {
-+  value_relation local_rel;
-   gimple *stmt = handler.stmt ();
-   tree op1 = handler.operand1 ();
-   tree op2 = handler.operand2 ();
-@@ -1101,6 +1087,7 @@ gori_compute::compute_operand1_range (vrange &r,
-   relation_trio trio;
-   if (rel)
-     trio = rel->create_trio (lhs_name, op1, op2);
-+  relation_kind op_op = trio.op1_op2 ();
- 
-   Value_Range op1_range (TREE_TYPE (op1));
-   Value_Range tmp (TREE_TYPE (op1));
-@@ -1113,10 +1100,26 @@ gori_compute::compute_operand1_range (vrange &r,
-   if (op2)
-     {
-       src.get_operand (op2_range, op2);
--      relation_kind op_op = trio.op1_op2 ();
-+
-+      // If there is a relation betwen op1 and op2, use it instead.
-+      // This allows multiple relations to be processed in compound logicals.
-+      if (gimple_range_ssa_p (op1) && gimple_range_ssa_p (op2))
-+      {
-+        relation_kind k = handler.op1_op2_relation (lhs);
-+        if (k != VREL_VARYING)
-+          {
-+            op_op = k;
-+            local_rel.set_relation (op_op, op1, op2);
-+            rel = &local_rel;
-+          }
-+      }
-+
-       if (op_op != VREL_VARYING)
-       refine_using_relation (op1, op1_range, op2, op2_range, src, op_op);
- 
-+      // If op1 == op2, create a new trio for just this call.
-+      if (op1 == op2 && gimple_range_ssa_p (op1))
-+      trio = relation_trio (trio.lhs_op1 (), trio.lhs_op2 (), VREL_EQ);
-       if (!handler.calc_op1 (tmp, lhs, op2_range, trio))
-       return false;
-     }
-@@ -1185,6 +1188,7 @@ gori_compute::compute_operand2_range (vrange &r,
-                                     const vrange &lhs, tree name,
-                                     fur_source &src, value_relation *rel)
- {
-+  value_relation local_rel;
-   gimple *stmt = handler.stmt ();
-   tree op1 = handler.operand1 ();
-   tree op2 = handler.operand2 ();
-@@ -1201,9 +1205,26 @@ gori_compute::compute_operand2_range (vrange &r,
-   if (rel)
-     trio = rel->create_trio (lhs_name, op1, op2);
-   relation_kind op_op = trio.op1_op2 ();
-+
-+  // If there is a relation betwen op1 and op2, use it instead.
-+  // This allows multiple relations to be processed in compound logicals.
-+  if (gimple_range_ssa_p (op1) && gimple_range_ssa_p (op2))
-+    {
-+      relation_kind k = handler.op1_op2_relation (lhs);
-+      if (k != VREL_VARYING)
-+      {
-+        op_op = k;
-+        local_rel.set_relation (op_op, op1, op2);
-+        rel = &local_rel;
-+      }
-+    }
-+
-   if (op_op != VREL_VARYING)
-     refine_using_relation (op1, op1_range, op2, op2_range, src, op_op);
- 
-+  // If op1 == op2, create a new trio for this stmt.
-+  if (op1 == op2 && gimple_range_ssa_p (op1))
-+    trio = relation_trio (trio.lhs_op1 (), trio.lhs_op2 (), VREL_EQ);
-   // Intersect with range for op2 based on lhs and op1.
-   if (!handler.calc_op2 (tmp, lhs, op1_range, trio))
-     return false;
---- /dev/null
-+++ b/gcc/testsuite/gcc.dg/pr109274.c
-@@ -0,0 +1,16 @@
-+/* PR tree-optimization/109274 */
-+/* { dg-do compile } */
-+/* { dg-options "-O2 " } */
-+
-+float a, b, c;
-+int d;
-+float bar (void);
-+
-+void
-+foo (void)
-+{
-+  a = 0 * -(2.0f * c);
-+  d = a != a ? 0 : bar ();
-+  b = c;
-+}
-+
---- /dev/null
-+++ b/gcc/testsuite/gfortran.dg/pr109265.f90
-@@ -0,0 +1,39 @@
-+! PR tree-optimization/109265
-+! { dg-do compile }
-+! { dg-options "-O3 -w" }
-+
-+module pr109265
-+  integer, parameter :: r8 = selected_real_kind (12)
-+contains
-+  subroutine foo (b, c, d, e, f)
-+    implicit none
-+    logical :: b
-+    real (kind = r8) :: c, d, e, f, i
-+    if (b) then
-+      c = bar (c * d, e)
-+      i = bar (f, c)
-+      call baz (i)
-+      call baz (-i)
-+    end if
-+  end subroutine foo
-+  function bar (a, b)
-+    implicit none
-+    real (kind = r8) :: bar
-+    real (kind = r8) :: a, b
-+    bar = a + b
-+  end function bar
-+  subroutine baz (b)
-+    implicit none
-+    real (kind = r8) :: b, d, e, f, g, h, i
-+    d = b
-+    i = 0
-+    e = d
-+    f = d
-+    g = d
-+  10 continue
-+    if ((e.eq.d) .and. (f.eq.d) .and. (g.eq.d) .and. (h.eq.d)) then
-+      h = i
-+      goto 10
-+    end if
-+  end subroutine baz
-+end module pr109265
---- a/gcc/value-relation.h
-+++ b/gcc/value-relation.h
-@@ -445,13 +445,6 @@ value_relation::set_relation (relation_kind r, tree n1, 
tree n2)
- {
-   gcc_checking_assert (TREE_CODE (n1) == SSA_NAME
-                      && TREE_CODE (n2) == SSA_NAME);
--  if (n1 == n2 && r != VREL_EQ)
--    {
--      related = VREL_VARYING;
--      name1 = NULL_TREE;
--      name2 = NULL_TREE;
--      return;
--    }
-   related = r;
-   name1 = n1;
-   name2 = n2;
--- 
-2.31.1

diff --git 
a/sys-devel/gcc/files/gcc-13.0.1_pre20230402-PR109304-ICE-python3.12.patch 
b/sys-devel/gcc/files/gcc-13.0.1_pre20230402-PR109304-ICE-python3.12.patch
deleted file mode 100644
index 8b6baea37b70..000000000000
--- a/sys-devel/gcc/files/gcc-13.0.1_pre20230402-PR109304-ICE-python3.12.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-https://bugs.gentoo.org/903245
-https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109304
-https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=d0b961b802dd7d9d555ff4515835a479329326e9
-
-From d0b961b802dd7d9d555ff4515835a479329326e9 Mon Sep 17 00:00:00 2001
-From: Richard Biener <rguent...@suse.de>
-Date: Tue, 28 Mar 2023 08:06:12 +0000
-Subject: [PATCH] tree-optimization/109304 - properly handle instrumented
- aliases
-
-When adjusting calls to reflect instrumentation we failed to handle
-calls to aliases since they appear to have no body.  Instead resort
-to symtab node availability.  The patch also avoids touching
-internal function calls in a more obvious way (builtins might
-have a body available).
-
-profiledbootstrap & regtest running on x86_64-unknown-linux-gnu.
-
-Honza - does this look OK?
-
-       PR tree-optimization/109304
-       * tree-profile.cc (tree_profiling): Use symtab node
-       availability to decide whether to skip adjusting calls.
-       Do not adjust calls to internal functions.
-
-       * gcc.dg/pr109304.c: New testcase.
---- /dev/null
-+++ b/gcc/testsuite/gcc.dg/pr109304.c
-@@ -0,0 +1,12 @@
-+/* { dg-do compile } */
-+/* { dg-require-profiling "-fprofile-generate" } */
-+/* { dg-require-effective-target fpic } */
-+/* { dg-options "-O3 -fprofile-generate -fPIC -fno-semantic-interposition" } 
*/
-+
-+int PyUnicode_FindChar_i;
-+int PyUnicode_FindChar()
-+{
-+  while (PyUnicode_FindChar_i)
-+    if (PyUnicode_FindChar())
-+      break;
-+}
---- a/gcc/tree-profile.cc
-+++ b/gcc/tree-profile.cc
-@@ -808,7 +808,7 @@ tree_profiling (void)
-       {
-       if (!gimple_has_body_p (node->decl)
-           || !(!node->clone_of
--          || node->decl != node->clone_of->decl))
-+               || node->decl != node->clone_of->decl))
-         continue;
- 
-       /* Don't profile functions produced for builtin stuff.  */
-@@ -842,12 +842,15 @@ tree_profiling (void)
-           for (gsi = gsi_start_bb (bb); !gsi_end_p (gsi); gsi_next (&gsi))
-             {
-               gcall *call = dyn_cast <gcall *> (gsi_stmt (gsi));
--              if (!call)
-+              if (!call || gimple_call_internal_p (call))
-                 continue;
- 
-               /* We do not clear pure/const on decls without body.  */
-               tree fndecl = gimple_call_fndecl (call);
--              if (fndecl && !gimple_has_body_p (fndecl))
-+              cgraph_node *callee;
-+              if (fndecl
-+                  && (callee = cgraph_node::get (fndecl))
-+                  && callee->get_availability (node) == AVAIL_NOT_AVAILABLE)
-                 continue;
- 
-               /* Drop the const attribute from the call type (the pure
--- 
-2.31.1

Reply via email to