From patchwork Thu Mar 31 18:35:03 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom de Vries X-Patchwork-Id: 89108 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 8AC0CB6F7A for ; Fri, 1 Apr 2011 05:35:23 +1100 (EST) Received: (qmail 30216 invoked by alias); 31 Mar 2011 18:35:20 -0000 Received: (qmail 30009 invoked by uid 22791); 31 Mar 2011 18:35:19 -0000 X-SWARE-Spam-Status: No, hits=-1.5 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; Thu, 31 Mar 2011 18:35:15 +0000 Received: (qmail 3757 invoked from network); 31 Mar 2011 18:35:14 -0000 Received: from unknown (HELO ?192.168.1.66?) (vries@127.0.0.2) by mail.codesourcery.com with ESMTPA; 31 Mar 2011 18:35:14 -0000 Message-ID: <4D94C957.6010800@codesourcery.com> Date: Thu, 31 Mar 2011 20:35:03 +0200 From: Tom de Vries User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.14) Gecko/20110223 Lightning/1.0b2 Thunderbird/3.1.8 MIME-Version: 1.0 To: gcc-patches@gcc.gnu.org, ebotcazou@libertysurf.fr Subject: [PATCH, PR43920, 4/9] Cross-jumping - Don't count use or clobber. References: <4D94C603.7080505@codesourcery.com> <4D94C88B.4020206@codesourcery.com> In-Reply-To: <4D94C88B.4020206@codesourcery.com> 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 Currently uses and clobbers are counted as insns in crossjumping, which can cause undesirable crossjumping. The patch fixes this. Thanks, - Tom Index: gcc/cfgcleanup.c =================================================================== --- gcc/cfgcleanup.c (revision 170556) +++ gcc/cfgcleanup.c (working copy) @@ -1074,6 +1074,7 @@ flow_find_cross_jump (basic_block bb1, b { rtx i1, i2, last1, last2, afterlast1, afterlast2; int ninsns = 0; + rtx p1; /* Skip simple jumps at the end of the blocks. Complex jumps still need to be compared for equivalence, which we'll do below. */ @@ -1122,7 +1123,9 @@ flow_find_cross_jump (basic_block bb1, b afterlast1 = last1, afterlast2 = last2; last1 = i1, last2 = i2; - ninsns++; + p1 = PATTERN (i1); + if (!(GET_CODE (p1) == USE || GET_CODE (p1) == CLOBBER)) + ninsns++; } i1 = PREV_INSN (i1);