From patchwork Mon Apr 24 21:30:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Pinski X-Patchwork-Id: 87172 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp3017093vqo; Mon, 24 Apr 2023 14:34:59 -0700 (PDT) X-Google-Smtp-Source: AKy350Ypt4ipfhXQw60X2ikr/xQlA6pz+OOqbW6gf++IU5ceZc3OUbgqUYb90zwoo65m5VutWbWy X-Received: by 2002:a17:906:381:b0:94f:8605:3f30 with SMTP id b1-20020a170906038100b0094f86053f30mr10679497eja.24.1682372099261; Mon, 24 Apr 2023 14:34:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682372099; cv=none; d=google.com; s=arc-20160816; b=x5Wg5t40rr/lfA1M5CZL2YFbyhuiFE4YV8uwAlLuVVIkv5lUDHlq1/kr7qREWDt/s+ Easy5pu0LHTZtY10TnmJEiO1xF1LMDwRqoBz+zm27ALkkzfQmII4V+glPeIYLP/vCiIK MnMfx5VXX9UZU7gd+EN8SRe3yEOTi/gv4tOvCiS1zstL2mZb6Qlh+GSfssd/09+0IDGb kA9QNhjkTPZATvfvUZeWkXcU1K0iKmmUZ6aqIfs0eMgPGK6iUuBaVmdNcLG4Y30VSALe Y6bAQo4uJEGrfjjZr09vBTGWs9KzpLJ0Yr9POhdr8+03+ruxdXVMSV4xs0nSd9eu4Mix YeGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:dmarc-filter:delivered-to :dkim-signature:dkim-filter; bh=puWAV6Qgv/yYkQvX9rBNsBTZU6qvmsvrIDWEtnRpSI4=; b=Ud4e2y6mFwLE7dEeiRwo11rLtz0jWWkRQ84dIn7hNFsFFSkN48XaSxfzyc6eZE8U3o h1L6doJc6oNfUxFSMbxi4SYsjcqalHBRP4w8adeWdMEW8AEKHXShf2V/5OqFDkne0l0T dVdrxdyV/o7syQVL/PNxYGq4QKnZB/kqjo1mm46wkjZFn6Me5Ppj74AtQHHdHzZpi1rj w0Szs3UMP/DOqf/cHN+wqzEuf8ychpLh9s+AgdLQ9G4viz3xrEKnmvg3uuXPB/qDwPr/ lmeX9exmaE+eJKdne+6lFjfbndBfwrUXYwg0UNPZhIXzY2pItNd9mmtzgdjwFONS2kZR YyYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=wPpYPdJ8; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [8.43.85.97]) by mx.google.com with ESMTPS id y8-20020a170906558800b00950ea4cbd1csi9573867ejp.241.2023.04.24.14.34.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 24 Apr 2023 14:34:59 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=wPpYPdJ8; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 01629385B527 for ; Mon, 24 Apr 2023 21:33:10 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 01629385B527 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1682371990; bh=puWAV6Qgv/yYkQvX9rBNsBTZU6qvmsvrIDWEtnRpSI4=; h=To:CC:Subject:Date:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=wPpYPdJ8ScC9/htHMT2pUO/etZ3Bb8BwmU5fX0oA4SqnAIpYhR6I5sMhVEzNS+TG2 vXsxAFgP8tSzs/u+EcxKeUq0MMwXfJlnAG00rQVbS47zm5p+lfymv7GL3H7NBgR3OT h9Pql35JlDxzV8nLCewW5jFg+oPgPzUlF5x4i0/s= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by sourceware.org (Postfix) with ESMTPS id C4AF83858C5E for ; Mon, 24 Apr 2023 21:30:24 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C4AF83858C5E Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33OKnSI2010728 for ; Mon, 24 Apr 2023 14:30:24 -0700 Received: from dc5-exch02.marvell.com ([199.233.59.182]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3q4f3p7pyj-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Mon, 24 Apr 2023 14:30:24 -0700 Received: from DC5-EXCH02.marvell.com (10.69.176.39) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server (TLS) id 15.0.1497.48; Mon, 24 Apr 2023 14:30:20 -0700 Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH02.marvell.com (10.69.176.39) with Microsoft SMTP Server id 15.0.1497.48 via Frontend Transport; Mon, 24 Apr 2023 14:30:20 -0700 Received: from vpnclient.wrightpinski.org.com (unknown [10.69.242.187]) by maili.marvell.com (Postfix) with ESMTP id 011043F70D1; Mon, 24 Apr 2023 14:30:19 -0700 (PDT) To: CC: Andrew Pinski Subject: [PATCH 2/7] PHIOPT: Rename tree_ssa_phiopt_worker to pass_phiopt::execute Date: Mon, 24 Apr 2023 14:30:06 -0700 Message-ID: <20230424213011.528181-3-apinski@marvell.com> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20230424213011.528181-1-apinski@marvell.com> References: <20230424213011.528181-1-apinski@marvell.com> MIME-Version: 1.0 X-Proofpoint-ORIG-GUID: qxIpjc4HiYjGELwSWEq24p-wpt1TZuis X-Proofpoint-GUID: qxIpjc4HiYjGELwSWEq24p-wpt1TZuis X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-24_11,2023-04-21_01,2023-02-09_01 X-Spam-Status: No, score=-14.5 required=5.0 tests=BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org X-BeenThere: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Andrew Pinski via Gcc-patches From: Andrew Pinski Reply-To: Andrew Pinski Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1764095006285739750?= X-GMAIL-MSGID: =?utf-8?q?1764095006285739750?= Now that store elimination and phiopt does not share outer code, we can move tree_ssa_phiopt_worker directly into pass_phiopt::execute and remove many declarations (prototypes) from the file. gcc/ChangeLog: * tree-ssa-phiopt.cc (two_value_replacement): Remove prototype. (match_simplify_replacement): Likewise. (factor_out_conditional_conversion): Likewise. (value_replacement): Likewise. (minmax_replacement): Likewise. (spaceship_replacement): Likewise. (cond_removal_in_builtin_zero_pattern): Likewise. (hoist_adjacent_loads): Likewise. (tree_ssa_phiopt_worker): Move into ... (pass_phiopt::execute): this. --- gcc/tree-ssa-phiopt.cc | 385 +++++++++++++++++++---------------------- 1 file changed, 181 insertions(+), 204 deletions(-) diff --git a/gcc/tree-ssa-phiopt.cc b/gcc/tree-ssa-phiopt.cc index 7f47b32576b..d232fd9b551 100644 --- a/gcc/tree-ssa-phiopt.cc +++ b/gcc/tree-ssa-phiopt.cc @@ -55,27 +55,10 @@ along with GCC; see the file COPYING3. If not see #include "tree-ssa-propagate.h" #include "tree-ssa-dce.h" -static bool two_value_replacement (basic_block, basic_block, edge, gphi *, - tree, tree); -static bool match_simplify_replacement (basic_block, basic_block, basic_block, - edge, edge, gphi *, tree, tree, bool, bool); -static gphi *factor_out_conditional_conversion (edge, edge, gphi *, tree, tree, - gimple *); -static int value_replacement (basic_block, basic_block, - edge, edge, gphi *, tree, tree); -static bool minmax_replacement (basic_block, basic_block, basic_block, - edge, edge, gphi *, tree, tree, bool); -static bool spaceship_replacement (basic_block, basic_block, - edge, edge, gphi *, tree, tree); -static bool cond_removal_in_builtin_zero_pattern (basic_block, basic_block, - edge, edge, gphi *, - tree, tree); static bool cond_store_replacement (basic_block, basic_block, edge, edge, hash_set *); static bool cond_if_else_store_replacement (basic_block, basic_block, basic_block); static hash_set * get_non_trapping (); -static void hoist_adjacent_loads (basic_block, basic_block, - basic_block, basic_block); /* Return the singleton PHI in the SEQ of PHIs for edges E0 and E1. */ @@ -104,188 +87,6 @@ single_non_singleton_phi_for_edges (gimple_seq seq, edge e0, edge e1) return phi; } -/* The core routine of phi optimizations. - DO_HOIST_LOADS is true when we want to hoist adjacent loads out - of diamond control flow patterns, false otherwise. */ -static unsigned int -tree_ssa_phiopt_worker (bool do_hoist_loads, bool early_p) -{ - basic_block bb; - basic_block *bb_order; - unsigned n, i; - bool cfgchanged = false; - - calculate_dominance_info (CDI_DOMINATORS); - - /* Search every basic block for COND_EXPR we may be able to optimize. - - We walk the blocks in order that guarantees that a block with - a single predecessor is processed before the predecessor. - This ensures that we collapse inner ifs before visiting the - outer ones, and also that we do not try to visit a removed - block. */ - bb_order = single_pred_before_succ_order (); - n = n_basic_blocks_for_fn (cfun) - NUM_FIXED_BLOCKS; - - for (i = 0; i < n; i++) - { - gphi *phi; - basic_block bb1, bb2; - edge e1, e2; - tree arg0, arg1; - bool diamond_p = false; - - bb = bb_order[i]; - - /* Check to see if the last statement is a GIMPLE_COND. */ - gcond *cond_stmt = safe_dyn_cast (*gsi_last_bb (bb)); - if (!cond_stmt) - continue; - - e1 = EDGE_SUCC (bb, 0); - bb1 = e1->dest; - e2 = EDGE_SUCC (bb, 1); - bb2 = e2->dest; - - /* We cannot do the optimization on abnormal edges. */ - if ((e1->flags & EDGE_ABNORMAL) != 0 - || (e2->flags & EDGE_ABNORMAL) != 0) - continue; - - /* If either bb1's succ or bb2 or bb2's succ is non NULL. */ - if (EDGE_COUNT (bb1->succs) == 0 - || EDGE_COUNT (bb2->succs) == 0) - continue; - - /* Find the bb which is the fall through to the other. */ - if (EDGE_SUCC (bb1, 0)->dest == bb2) - ; - else if (EDGE_SUCC (bb2, 0)->dest == bb1) - { - std::swap (bb1, bb2); - std::swap (e1, e2); - } - else if (EDGE_SUCC (bb1, 0)->dest == EDGE_SUCC (bb2, 0)->dest - && single_succ_p (bb2)) - { - diamond_p = true; - e2 = EDGE_SUCC (bb2, 0); - /* Make sure bb2 is just a fall through. */ - if ((e2->flags & EDGE_FALLTHRU) == 0) - continue; - } - else - continue; - - e1 = EDGE_SUCC (bb1, 0); - - /* Make sure that bb1 is just a fall through. */ - if (!single_succ_p (bb1) - || (e1->flags & EDGE_FALLTHRU) == 0) - continue; - - if (diamond_p) - { - basic_block bb3 = e1->dest; - - if (!single_pred_p (bb1) - || !single_pred_p (bb2)) - continue; - - if (do_hoist_loads - && !FLOAT_TYPE_P (TREE_TYPE (gimple_cond_lhs (cond_stmt))) - && EDGE_COUNT (bb->succs) == 2 - && EDGE_COUNT (bb3->preds) == 2 - /* If one edge or the other is dominant, a conditional move - is likely to perform worse than the well-predicted branch. */ - && !predictable_edge_p (EDGE_SUCC (bb, 0)) - && !predictable_edge_p (EDGE_SUCC (bb, 1))) - hoist_adjacent_loads (bb, bb1, bb2, bb3); - } - - gimple_stmt_iterator gsi; - bool candorest = true; - - /* Check that we're looking for nested phis. */ - basic_block merge = diamond_p ? EDGE_SUCC (bb2, 0)->dest : bb2; - gimple_seq phis = phi_nodes (merge); - - /* Value replacement can work with more than one PHI - so try that first. */ - if (!early_p && !diamond_p) - for (gsi = gsi_start (phis); !gsi_end_p (gsi); gsi_next (&gsi)) - { - phi = as_a (gsi_stmt (gsi)); - arg0 = gimple_phi_arg_def (phi, e1->dest_idx); - arg1 = gimple_phi_arg_def (phi, e2->dest_idx); - if (value_replacement (bb, bb1, e1, e2, phi, arg0, arg1) == 2) - { - candorest = false; - cfgchanged = true; - break; - } - } - - if (!candorest) - continue; - - phi = single_non_singleton_phi_for_edges (phis, e1, e2); - if (!phi) - continue; - - arg0 = gimple_phi_arg_def (phi, e1->dest_idx); - arg1 = gimple_phi_arg_def (phi, e2->dest_idx); - - /* Something is wrong if we cannot find the arguments in the PHI - node. */ - gcc_assert (arg0 != NULL_TREE && arg1 != NULL_TREE); - - gphi *newphi; - if (single_pred_p (bb1) - && !diamond_p - && (newphi = factor_out_conditional_conversion (e1, e2, phi, - arg0, arg1, - cond_stmt))) - { - phi = newphi; - /* factor_out_conditional_conversion may create a new PHI in - BB2 and eliminate an existing PHI in BB2. Recompute values - that may be affected by that change. */ - arg0 = gimple_phi_arg_def (phi, e1->dest_idx); - arg1 = gimple_phi_arg_def (phi, e2->dest_idx); - gcc_assert (arg0 != NULL_TREE && arg1 != NULL_TREE); - } - - /* Do the replacement of conditional if it can be done. */ - if (!early_p - && !diamond_p - && two_value_replacement (bb, bb1, e2, phi, arg0, arg1)) - cfgchanged = true; - else if (match_simplify_replacement (bb, bb1, bb2, e1, e2, phi, - arg0, arg1, early_p, diamond_p)) - cfgchanged = true; - else if (!early_p - && !diamond_p - && single_pred_p (bb1) - && cond_removal_in_builtin_zero_pattern (bb, bb1, e1, e2, - phi, arg0, arg1)) - cfgchanged = true; - else if (minmax_replacement (bb, bb1, bb2, e1, e2, phi, arg0, arg1, - diamond_p)) - cfgchanged = true; - else if (single_pred_p (bb1) - && !diamond_p - && spaceship_replacement (bb, bb1, e1, e2, phi, arg0, arg1)) - cfgchanged = true; - } - - free (bb_order); - - if (cfgchanged) - return TODO_cleanup_cfg; - return 0; -} - /* The core routine of conditional store replacement. */ static unsigned int store_elim_worker (void) @@ -4328,11 +4129,7 @@ public: early_p = param; } bool gate (function *) final override { return flag_ssa_phiopt; } - unsigned int execute (function *) final override - { - return tree_ssa_phiopt_worker (!early_p ? gate_hoist_loads () : false, - early_p); - } + unsigned int execute (function *) final override; private: bool early_p; @@ -4346,6 +4143,186 @@ make_pass_phiopt (gcc::context *ctxt) return new pass_phiopt (ctxt); } +unsigned int +pass_phiopt::execute (function *) +{ + bool do_hoist_loads = !early_p ? gate_hoist_loads () : false; + basic_block bb; + basic_block *bb_order; + unsigned n, i; + bool cfgchanged = false; + + calculate_dominance_info (CDI_DOMINATORS); + + /* Search every basic block for COND_EXPR we may be able to optimize. + + We walk the blocks in order that guarantees that a block with + a single predecessor is processed before the predecessor. + This ensures that we collapse inner ifs before visiting the + outer ones, and also that we do not try to visit a removed + block. */ + bb_order = single_pred_before_succ_order (); + n = n_basic_blocks_for_fn (cfun) - NUM_FIXED_BLOCKS; + + for (i = 0; i < n; i++) + { + gphi *phi; + basic_block bb1, bb2; + edge e1, e2; + tree arg0, arg1; + bool diamond_p = false; + + bb = bb_order[i]; + + /* Check to see if the last statement is a GIMPLE_COND. */ + gcond *cond_stmt = safe_dyn_cast (*gsi_last_bb (bb)); + if (!cond_stmt) + continue; + + e1 = EDGE_SUCC (bb, 0); + bb1 = e1->dest; + e2 = EDGE_SUCC (bb, 1); + bb2 = e2->dest; + + /* We cannot do the optimization on abnormal edges. */ + if ((e1->flags & EDGE_ABNORMAL) != 0 + || (e2->flags & EDGE_ABNORMAL) != 0) + continue; + + /* If either bb1's succ or bb2 or bb2's succ is non NULL. */ + if (EDGE_COUNT (bb1->succs) == 0 + || EDGE_COUNT (bb2->succs) == 0) + continue; + + /* Find the bb which is the fall through to the other. */ + if (EDGE_SUCC (bb1, 0)->dest == bb2) + ; + else if (EDGE_SUCC (bb2, 0)->dest == bb1) + { + std::swap (bb1, bb2); + std::swap (e1, e2); + } + else if (EDGE_SUCC (bb1, 0)->dest == EDGE_SUCC (bb2, 0)->dest + && single_succ_p (bb2)) + { + diamond_p = true; + e2 = EDGE_SUCC (bb2, 0); + /* Make sure bb2 is just a fall through. */ + if ((e2->flags & EDGE_FALLTHRU) == 0) + continue; + } + else + continue; + + e1 = EDGE_SUCC (bb1, 0); + + /* Make sure that bb1 is just a fall through. */ + if (!single_succ_p (bb1) + || (e1->flags & EDGE_FALLTHRU) == 0) + continue; + + if (diamond_p) + { + basic_block bb3 = e1->dest; + + if (!single_pred_p (bb1) + || !single_pred_p (bb2)) + continue; + + if (do_hoist_loads + && !FLOAT_TYPE_P (TREE_TYPE (gimple_cond_lhs (cond_stmt))) + && EDGE_COUNT (bb->succs) == 2 + && EDGE_COUNT (bb3->preds) == 2 + /* If one edge or the other is dominant, a conditional move + is likely to perform worse than the well-predicted branch. */ + && !predictable_edge_p (EDGE_SUCC (bb, 0)) + && !predictable_edge_p (EDGE_SUCC (bb, 1))) + hoist_adjacent_loads (bb, bb1, bb2, bb3); + } + + gimple_stmt_iterator gsi; + bool candorest = true; + + /* Check that we're looking for nested phis. */ + basic_block merge = diamond_p ? EDGE_SUCC (bb2, 0)->dest : bb2; + gimple_seq phis = phi_nodes (merge); + + /* Value replacement can work with more than one PHI + so try that first. */ + if (!early_p && !diamond_p) + for (gsi = gsi_start (phis); !gsi_end_p (gsi); gsi_next (&gsi)) + { + phi = as_a (gsi_stmt (gsi)); + arg0 = gimple_phi_arg_def (phi, e1->dest_idx); + arg1 = gimple_phi_arg_def (phi, e2->dest_idx); + if (value_replacement (bb, bb1, e1, e2, phi, arg0, arg1) == 2) + { + candorest = false; + cfgchanged = true; + break; + } + } + + if (!candorest) + continue; + + phi = single_non_singleton_phi_for_edges (phis, e1, e2); + if (!phi) + continue; + + arg0 = gimple_phi_arg_def (phi, e1->dest_idx); + arg1 = gimple_phi_arg_def (phi, e2->dest_idx); + + /* Something is wrong if we cannot find the arguments in the PHI + node. */ + gcc_assert (arg0 != NULL_TREE && arg1 != NULL_TREE); + + gphi *newphi; + if (single_pred_p (bb1) + && !diamond_p + && (newphi = factor_out_conditional_conversion (e1, e2, phi, + arg0, arg1, + cond_stmt))) + { + phi = newphi; + /* factor_out_conditional_conversion may create a new PHI in + BB2 and eliminate an existing PHI in BB2. Recompute values + that may be affected by that change. */ + arg0 = gimple_phi_arg_def (phi, e1->dest_idx); + arg1 = gimple_phi_arg_def (phi, e2->dest_idx); + gcc_assert (arg0 != NULL_TREE && arg1 != NULL_TREE); + } + + /* Do the replacement of conditional if it can be done. */ + if (!early_p + && !diamond_p + && two_value_replacement (bb, bb1, e2, phi, arg0, arg1)) + cfgchanged = true; + else if (match_simplify_replacement (bb, bb1, bb2, e1, e2, phi, + arg0, arg1, early_p, diamond_p)) + cfgchanged = true; + else if (!early_p + && !diamond_p + && single_pred_p (bb1) + && cond_removal_in_builtin_zero_pattern (bb, bb1, e1, e2, + phi, arg0, arg1)) + cfgchanged = true; + else if (minmax_replacement (bb, bb1, bb2, e1, e2, phi, arg0, arg1, + diamond_p)) + cfgchanged = true; + else if (single_pred_p (bb1) + && !diamond_p + && spaceship_replacement (bb, bb1, e1, e2, phi, arg0, arg1)) + cfgchanged = true; + } + + free (bb_order); + + if (cfgchanged) + return TODO_cleanup_cfg; + return 0; +} + /* This pass tries to transform conditional stores into unconditional ones, enabling further simplifications with the simpler then and else blocks. In particular it replaces this: