]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
drop redundant ifcombine_ifandif parm
authorAlexandre Oliva <oliva@adacore.com>
Thu, 7 Nov 2024 05:47:19 +0000 (02:47 -0300)
committerAlexandre Oliva <oliva@gnu.org>
Thu, 7 Nov 2024 05:47:19 +0000 (02:47 -0300)
In preparation to changes that may modify both inner and outer
conditions in ifcombine, drop the redundant parameter result_inv, that
is always identical to inner_inv.

for  gcc/ChangeLog

* tree-ssa-ifcombine.cc (ifcombine_ifandif): Drop redundant
result_inv parm.  Adjust all callers.

gcc/tree-ssa-ifcombine.cc

index 57b7e4b62f291c98b67f4c7d03ce52fe6eb9b204..7fc46a913768a4a340e6ed9f761acbb8518d1579 100644 (file)
@@ -402,14 +402,14 @@ update_profile_after_ifcombine (basic_block inner_cond_bb,
 
 /* If-convert on a and pattern with a common else block.  The inner
    if is specified by its INNER_COND_BB, the outer by OUTER_COND_BB.
-   inner_inv, outer_inv and result_inv indicate whether the conditions
-   are inverted.
+   inner_inv, outer_inv indicate whether the conditions are inverted.
    Returns true if the edges to the common else basic-block were merged.  */
 
 static bool
 ifcombine_ifandif (basic_block inner_cond_bb, bool inner_inv,
-                  basic_block outer_cond_bb, bool outer_inv, bool result_inv)
+                  basic_block outer_cond_bb, bool outer_inv)
 {
+  bool result_inv = inner_inv;
   gimple_stmt_iterator gsi;
   tree name1, name2, bit1, bit2, bits1, bits2;
 
@@ -694,8 +694,7 @@ tree_ssa_ifcombine_bb_1 (basic_block inner_cond_bb, basic_block outer_cond_bb,
           <else_bb>
             ...
        */
-      return ifcombine_ifandif (inner_cond_bb, false, outer_cond_bb, false,
-                               false);
+      return ifcombine_ifandif (inner_cond_bb, false, outer_cond_bb, false);
     }
 
   /* And a version where the outer condition is negated.  */
@@ -712,8 +711,7 @@ tree_ssa_ifcombine_bb_1 (basic_block inner_cond_bb, basic_block outer_cond_bb,
           <else_bb>
             ...
        */
-      return ifcombine_ifandif (inner_cond_bb, false, outer_cond_bb, true,
-                               false);
+      return ifcombine_ifandif (inner_cond_bb, false, outer_cond_bb, true);
     }
 
   /* The || form is characterized by a common then_bb with the
@@ -732,8 +730,7 @@ tree_ssa_ifcombine_bb_1 (basic_block inner_cond_bb, basic_block outer_cond_bb,
           <then_bb>
             ...
        */
-      return ifcombine_ifandif (inner_cond_bb, true, outer_cond_bb, true,
-                               true);
+      return ifcombine_ifandif (inner_cond_bb, true, outer_cond_bb, true);
     }
 
   /* And a version where the outer condition is negated.  */
@@ -749,8 +746,7 @@ tree_ssa_ifcombine_bb_1 (basic_block inner_cond_bb, basic_block outer_cond_bb,
           <then_bb>
             ...
        */
-      return ifcombine_ifandif (inner_cond_bb, true, outer_cond_bb, false,
-                               true);
+      return ifcombine_ifandif (inner_cond_bb, true, outer_cond_bb, false);
     }
 
   return false;