From patchwork Thu Nov 17 21:55:13 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bill Schmidt X-Patchwork-Id: 126323 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]) by ozlabs.org (Postfix) with SMTP id 83FF2B7249 for ; Fri, 18 Nov 2011 08:56:53 +1100 (EST) Received: (qmail 7436 invoked by alias); 17 Nov 2011 21:56:52 -0000 Received: (qmail 7425 invoked by uid 22791); 17 Nov 2011 21:56:51 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, TW_TM X-Spam-Check-By: sourceware.org Received: from e32.co.us.ibm.com (HELO e32.co.us.ibm.com) (32.97.110.150) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 17 Nov 2011 21:56:38 +0000 Received: from /spool/local by e32.co.us.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Thu, 17 Nov 2011 14:56:37 -0700 Received: from d03relay03.boulder.ibm.com ([9.17.195.228]) by e32.co.us.ibm.com ([192.168.1.132]) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Thu, 17 Nov 2011 14:56:03 -0700 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay03.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id pAHLtoJV098346 for ; Thu, 17 Nov 2011 14:55:59 -0700 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVout) with ESMTP id pAHLtogT028773 for ; Thu, 17 Nov 2011 14:55:50 -0700 Received: from [9.65.8.250] (sig-9-65-8-250.mts.ibm.com [9.65.8.250]) by d03av02.boulder.ibm.com (8.14.4/8.13.1/NCO v10.0 AVin) with ESMTP id pAHLtovo028714; Thu, 17 Nov 2011 14:55:50 -0700 Subject: [PATCH] Mark back edges in insert_backedge_copies From: "William J. Schmidt" To: gcc-patches@gcc.gnu.org Cc: bergner@vnet.ibm.com Date: Thu, 17 Nov 2011 15:55:13 -0600 Message-ID: <1321566913.8437.7.camel@gnopaine> Mime-Version: 1.0 x-cbid: 11111721-3270-0000-0000-000001D9B964 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 Greetings, While investigating http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39976, I found that tree-outof-ssa.c:insert_backedge_copies tests whether edges are back edges, but the back edges haven't been marked to facilitate this. (This was the reason the failures started happening in r149206, although fixing it doesn't take care of the problem in the current trunk revision because of the duplicate PHIs noted in the issue.) This simple patch updates the back edge information where it's needed. Bootstrapped and regression tested on powerpc64-linux. OK for trunk? Thanks, Bill 2011-11-17 Bill Schmidt * tree-outof-ssa.c (insert_back_edge_copies): Add call to mark_dfs_back_edges. Index: gcc/tree-outof-ssa.c =================================================================== --- gcc/tree-outof-ssa.c (revision 181442) +++ gcc/tree-outof-ssa.c (working copy) @@ -1021,6 +1021,8 @@ insert_backedge_copies (void) basic_block bb; gimple_stmt_iterator gsi; + mark_dfs_back_edges (); + FOR_EACH_BB (bb) { /* Mark block as possibly needing calculation of UIDs. */