From patchwork Thu Jun 9 20:28:47 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xinliang David Li X-Patchwork-Id: 99797 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 12BC9B6FE9 for ; Fri, 10 Jun 2011 06:29:05 +1000 (EST) Received: (qmail 13887 invoked by alias); 9 Jun 2011 20:29:04 -0000 Received: (qmail 13878 invoked by uid 22791); 9 Jun 2011 20:29:04 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, SPF_HELO_PASS, TW_DB, T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp-out.google.com (HELO smtp-out.google.com) (216.239.44.51) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 09 Jun 2011 20:28:50 +0000 Received: from kpbe14.cbf.corp.google.com (kpbe14.cbf.corp.google.com [172.25.105.78]) by smtp-out.google.com with ESMTP id p59KSnFj028288; Thu, 9 Jun 2011 13:28:49 -0700 Received: from syzygy.mtv.corp.google.com (syzygy.mtv.corp.google.com [172.18.110.229]) by kpbe14.cbf.corp.google.com with ESMTP id p59KSm75021927; Thu, 9 Jun 2011 13:28:48 -0700 Received: by syzygy.mtv.corp.google.com (Postfix, from userid 74076) id D1B7C20C79; Thu, 9 Jun 2011 13:28:47 -0700 (PDT) To: reply@codereview.appspotmail.com, gcc-patches@gcc.gnu.org Subject: [google] cprop pass's gate function cleanup (issue4572055) Message-Id: <20110609202847.D1B7C20C79@syzygy.mtv.corp.google.com> Date: Thu, 9 Jun 2011 13:28:47 -0700 (PDT) From: davidxl@google.com (David Li) X-System-Of-Record: true 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 The patch fixed the breakage due to the r174848 backport to google/main -- the gate function for cprop is in a different file from trunk. 2011-06-09 David Li * gcse.c (gate_rtl_cprop): Gate cleanup (execute_rtl_cprop): Gate cleanup --- This patch is available for review at http://codereview.appspot.com/4572055 Index: gcse.c =================================================================== --- gcse.c (revision 174852) +++ gcse.c (working copy) @@ -5309,15 +5309,17 @@ one_cprop_pass (void) static bool gate_rtl_cprop (void) { - return optimize > 0 && flag_gcse - && !cfun->calls_setjmp - && dbg_cnt (cprop); + return optimize > 0 && flag_gcse; } static unsigned int execute_rtl_cprop (void) { int changed; + if (cfun->calls_setjmp + || !dbg_cnt (cprop)) + return 0; + delete_unreachable_blocks (); df_set_flags (DF_LR_RUN_DCE); df_analyze ();