From patchwork Wed Sep 25 21:48:04 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dehao Chen X-Patchwork-Id: 278030 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 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id 1CBD82C009E for ; Thu, 26 Sep 2013 07:48:13 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :mime-version:date:message-id:subject:from:to:content-type; q= dns; s=default; b=AFF7nLl8UFyp80CrBcUvcrjY/2cUzfb1BLJPVHUnNUAO0C ZtlH4NR87ORwZhHFP+8/KtpzYkgzQrWCQ+sWQoykhzZQ5MpUDfVgunw6+ABEE7i4 3LogY6WLY0Kf00TtrCY3BlMlY4sr2H7KSHJxoUQWZ/lZvVDuiDhcg7wMhZerE= 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 :mime-version:date:message-id:subject:from:to:content-type; s= default; bh=m4jIzfDHfPkcAwG5OKNOpEbR5CM=; b=CJoGhwZEAdvGhi76OLwA /JPeSHPa/N+ocwVrgCY056N0PQ1/+KIXscSrTIBobV29Yn15z83/1DyZpbK7nGgk fF7tNw7JwEmqkS16Ky9PbyzsMCNys7C6SGZUfb7LvdYW2nl1pCJF0weYdHejfcrv iO2wnE2iuTZjFXrdh5S5LTY= Received: (qmail 5361 invoked by alias); 25 Sep 2013 21:48:07 -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 5351 invoked by uid 89); 25 Sep 2013 21:48:06 -0000 Received: from mail-ie0-f171.google.com (HELO mail-ie0-f171.google.com) (209.85.223.171) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-SHA encrypted) ESMTPS; Wed, 25 Sep 2013 21:48:06 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.8 required=5.0 tests=AWL, BAYES_00, NO_RELAYS, SPAM_SUBJECT autolearn=no version=3.3.2 X-HELO: mail-ie0-f171.google.com Received: by mail-ie0-f171.google.com with SMTP id at1so351260iec.16 for ; Wed, 25 Sep 2013 14:48:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=yC6IgfyWTBL/lrTtAKgiKUUVqOitqTryDWod6o4JTks=; b=YweoKOrCfdV5ao0isSly55i58wic3TUR6L4ehSFFyBzAoVZYZNo/9niQv0xryTrpjr agxRCnWYetQR7LfVatDodVS3I0tk9h51is89/ohGJIq6EobyPPB8xFGTIDywakD1q29T M+0nCvcrKR7quS+KFmtlKw1CWS2l3oyHKyRI1aCUDt3LNJRb2z/6gYqrGCPaU++vqtLz /ahLvttMgPPFrKQk5U4oGePw+XMv0CjOlJdNSJSrOE+Xk+D8V7FqumXZf9MQVv91roXA OHY3GtLF4QrjieY/NSudoQ7lpBy5AQTK41s7NoxDPpnhzjotSV0x9F/xfw/v2/JWtJ33 w/DQ== X-Gm-Message-State: ALoCoQkCLpMTooVSUFsvYpTQ3xEBo3pg/uUCIZ2Xw1ZSaWmXTJvj6rrlQVQTzkFnR0LC6cYmflCJ16uFfulqYhxxVvO7c14n4ot1ZayFvrk9u4q8UOkyw1LMuQS6e1JK9SlfKhK1Q8w9tXSHPsdJBmXzVxmwJdch47L7fnFqLZjuknNEB6LShSwY5gNjXo1qRq/sA0JmWPNoYzoAfdKMM1n5Ork3jt54Ug== MIME-Version: 1.0 X-Received: by 10.43.151.12 with SMTP id kq12mr18580028icc.55.1380145684345; Wed, 25 Sep 2013 14:48:04 -0700 (PDT) Received: by 10.64.9.133 with HTTP; Wed, 25 Sep 2013 14:48:04 -0700 (PDT) Date: Wed, 25 Sep 2013 14:48:04 -0700 Message-ID: Subject: [GOOGLE] Disable aggressive loop peeling to prevent code bloat. From: Dehao Chen To: GCC Patches , David Li X-IsSubscribed: yes This patch disables aggressive loop peeling when profile is available. This prevents extensive code bloat which leads to increased i-cache misses. Bootstrapped and passed regression tests. OK for google-4_8? Thanks, Dehao Index: gcc/loop-unroll.c =================================================================== --- gcc/loop-unroll.c (revision 202926) +++ gcc/loop-unroll.c (working copy) @@ -1574,8 +1574,7 @@ decide_peel_simple (struct loop *loop, int flags) peeling it is not the case. Also a function call inside loop is also branch from branch prediction POV (and probably better reason to not unroll/peel). */ - if (desc->num_branches > 1 - && profile_status != PROFILE_READ) + if (desc->num_branches > 1) { if (dump_file) fprintf (dump_file, ";; Not peeling, contains branches\n");