From patchwork Wed Jun 23 20:16:35 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxim Kuvyrkov X-Patchwork-Id: 56710 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 B7115B6F15 for ; Thu, 24 Jun 2010 06:16:51 +1000 (EST) Received: (qmail 5456 invoked by alias); 23 Jun 2010 20:16:45 -0000 Received: (qmail 5383 invoked by uid 22791); 23 Jun 2010 20:16:43 -0000 X-SWARE-Spam-Status: No, hits=-1.9 required=5.0 tests=AWL, BAYES_00, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (38.113.113.100) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 23 Jun 2010 20:16:39 +0000 Received: (qmail 8261 invoked from network); 23 Jun 2010 20:16:37 -0000 Received: from unknown (HELO ?172.16.1.24?) (maxim@127.0.0.2) by mail.codesourcery.com with ESMTPA; 23 Jun 2010 20:16:37 -0000 Message-ID: <4C226BA3.6060905@codesourcery.com> Date: Thu, 24 Jun 2010 00:16:35 +0400 From: Maxim Kuvyrkov User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.1.10) Gecko/20100512 Thunderbird/3.0.5 MIME-Version: 1.0 To: Jeff Law CC: Steven Bosscher , gcc-patches Subject: Update compute_transpout References: <4C18F225.2040509@codesourcery.com> In-Reply-To: <4C18F225.2040509@codesourcery.com> X-IsSubscribed: yes 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 This patches addresses http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33828#c5 . The comment is indeed outdated and harmless CALL instructions are being unjustly treated. OK to check in? diff --git a/gcc/gcse.c b/gcc/gcse.c index 45eb7bc..09f8ddf 100644 --- a/gcc/gcse.c +++ b/gcc/gcse.c @@ -4117,12 +4117,18 @@ compute_transpout (void) FOR_EACH_BB (bb) { - /* Note that flow inserted a nop at the end of basic blocks that - end in call instructions for reasons other than abnormal - control flow. */ if (! CALL_P (BB_END (bb))) continue; + if (EDGE_COUNT (bb->succs) == 1 + && !(EDGE_SUCC (bb, 0)->flags & EDGE_COMPLEX)) + /* The call insn doesn't involve any special control flow and + just happens to be the last in basic block. */ + { + gcc_assert (EDGE_SUCC (bb, 0)->flags & EDGE_FALLTHRU); + continue; + } + for (i = 0; i < expr_hash_table.size; i++) for (expr = expr_hash_table.table[i]; expr ; expr = expr->next_same_hash) if (MEM_P (expr->expr))