From patchwork Mon Mar 20 11:43:16 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Biener X-Patchwork-Id: 740962 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3vmvGV2Wgsz9s1y for ; Mon, 20 Mar 2017 22:43:29 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="D+XB6K/U"; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; q=dns; s= default; b=roiOBUPSNo3zCOm1YpKjWLlBpR+FGKQzcRTsDXaHjgux1gMmeM5mp Vaf6mUt9E7e2sbYbG5t1ncqCY+OuzvNr03qZMmjlwdTQeqvxfI+Mr/L+7r2pI119 9xEl7HEcIaVkecYHi5vBFJWJ4dgQQDu4I5iWsoU4cRI7fbmOfEdwJI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:subject:message-id:mime-version:content-type; s= default; bh=NMnX+3XZxWifdZl1zBJy5nyh4tg=; b=D+XB6K/Ugp/FPqqYWJwG Ed5PV3Qi36CcvEM/iNNTzDMt/jqxTiSrEULGHanrU/+v9tIb6fakr8BqrI5Lzqdz dtf120vpBW1Zu31rOwH9bM9uxGuzlfSLCN4vYxSZs0yjTusVFnyrXvs3dZTJuT9o jFopz946/X35sHjsTfzjOmQ= Received: (qmail 100013 invoked by alias); 20 Mar 2017 11:43:20 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 99989 invoked by uid 89); 20 Mar 2017 11:43:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-11.9 required=5.0 tests=BAYES_00, GIT_PATCH_2, GIT_PATCH_3, RP_MATCHES_RCVD, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 20 Mar 2017 11:43:17 +0000 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 3D776ABB1 for ; Mon, 20 Mar 2017 11:43:16 +0000 (UTC) Date: Mon, 20 Mar 2017 12:43:16 +0100 (CET) From: Richard Biener To: gcc-patches@gcc.gnu.org Subject: [PATCH] Fix PR80113 Message-ID: User-Agent: Alpine 2.20 (LSU 67 2015-01-07) MIME-Version: 1.0 The following fixes dangling SSA names running havoc with "simple" out-of-SSA coalescing. Bootstrapped on x86_64-unknown-linux-gnu, testing in progress. Richard. 2017-03-20 Richard Biener PR tree-optimization/80113 * graphite-isl-ast-to-gimple.c (copy_loop_phi_nodes): Do not allocate extra SSA name for PHI def. (add_close_phis_to_outer_loops): Likewise. (add_close_phis_to_merge_points): Likewise. (copy_loop_close_phi_args): Likewise. (copy_cond_phi_nodes): Likewise. Index: gcc/graphite-isl-ast-to-gimple.c =================================================================== --- gcc/graphite-isl-ast-to-gimple.c (revision 246224) +++ gcc/graphite-isl-ast-to-gimple.c (working copy) @@ -1891,7 +1891,7 @@ copy_loop_phi_nodes (basic_block bb, bas if (is_gimple_reg (res) && scev_analyzable_p (res, region->region)) continue; - gphi *new_phi = create_phi_node (SSA_NAME_VAR (res), new_bb); + gphi *new_phi = create_phi_node (NULL_TREE, new_bb); tree new_res = create_new_def_for (res, new_phi, gimple_phi_result_ptr (new_phi)); set_rename (res, new_res); @@ -1991,7 +1991,7 @@ add_close_phis_to_outer_loops (tree last if (!bb_contains_loop_close_phi_nodes (bb) || !single_succ_p (bb)) bb = split_edge (e); - gphi *close_phi = create_phi_node (SSA_NAME_VAR (last_merge_name), bb); + gphi *close_phi = create_phi_node (NULL_TREE, bb); tree res = create_new_def_for (last_merge_name, close_phi, gimple_phi_result_ptr (close_phi)); set_rename (old_close_phi_name, res); @@ -2036,7 +2036,7 @@ add_close_phis_to_merge_points (gphi *ol last_merge_name = add_close_phis_to_outer_loops (last_merge_name, merge_e, old_close_phi); - gphi *merge_phi = create_phi_node (SSA_NAME_VAR (old_close_phi_name), new_merge_bb); + gphi *merge_phi = create_phi_node (NULL_TREE, new_merge_bb); tree merge_res = create_new_def_for (old_close_phi_name, merge_phi, gimple_phi_result_ptr (merge_phi)); set_rename (old_close_phi_name, merge_res); @@ -2089,7 +2089,7 @@ copy_loop_close_phi_args (basic_block ol /* Loop close phi nodes should not be scev_analyzable_p. */ gcc_unreachable (); - gphi *new_close_phi = create_phi_node (SSA_NAME_VAR (res), new_bb); + gphi *new_close_phi = create_phi_node (NULL_TREE, new_bb); tree new_res = create_new_def_for (res, new_close_phi, gimple_phi_result_ptr (new_close_phi)); set_rename (res, new_res); @@ -2472,7 +2472,7 @@ copy_cond_phi_nodes (basic_block bb, bas if (virtual_operand_p (res)) continue; - gphi *new_phi = create_phi_node (SSA_NAME_VAR (res), new_bb); + gphi *new_phi = create_phi_node (NULL_TREE, new_bb); tree new_res = create_new_def_for (res, new_phi, gimple_phi_result_ptr (new_phi)); set_rename (res, new_res);