From patchwork Tue Jul 17 09:20:08 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ramana Radhakrishnan X-Patchwork-Id: 10040 Return-Path: X-Original-To: patchwork@peony.canonical.com Delivered-To: patchwork@peony.canonical.com Received: from fiordland.canonical.com (fiordland.canonical.com [91.189.94.145]) by peony.canonical.com (Postfix) with ESMTP id E4A4A2402A for ; Tue, 17 Jul 2012 09:20:10 +0000 (UTC) Received: from mail-gg0-f180.google.com (mail-gg0-f180.google.com [209.85.161.180]) by fiordland.canonical.com (Postfix) with ESMTP id 96C74A18078 for ; Tue, 17 Jul 2012 09:20:10 +0000 (UTC) Received: by ggnf1 with SMTP id f1so153444ggn.11 for ; Tue, 17 Jul 2012 02:20:10 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-forwarded-to:x-forwarded-for:delivered-to:received-spf :mime-version:date:message-id:subject:from:to:cc:content-type :x-gm-message-state; bh=kThJEj3qz2XjVvjGjxgc0+ki7dAqZ1juVV/uPZ3JJ+w=; b=igjWcqNXFYfgGMF3JySOPju2NT9Cu9YxF3nEYvxPN+2HOLmMZ6b76DG58Ay4BD7tUz v05AgH+k5gu99YmYAbCr9sjdkVhV3lc8O3SP2DC5WOpx4G48BN1HUxSGfCjakMRvBfSR J7O6E/oUENWe47Nii4aX6rRoljgmzAP/aRq4nm4o2vi1Gr4gfx9rmGsP9gWAugNbwM1C Rm3Yq23kylnWWZDByeYCZEPAC5CEM8hi+s2xNlHXT1ne3MUSe8/B2NzMoIKE/8XwGylh z1Jffo9+CKjwYhdfl6VQbBU0TonrpzygXJq2s8v2TY6cDe5Yrzy4bZzaIdgaU/vqofW/ dHHw== Received: by 10.50.87.227 with SMTP id bb3mr675981igb.57.1342516809938; Tue, 17 Jul 2012 02:20:09 -0700 (PDT) X-Forwarded-To: linaro-patchwork@canonical.com X-Forwarded-For: patch@linaro.org linaro-patchwork@canonical.com Delivered-To: patches@linaro.org Received: by 10.231.241.2 with SMTP id lc2csp16824ibb; Tue, 17 Jul 2012 02:20:09 -0700 (PDT) Received: by 10.52.92.70 with SMTP id ck6mr742992vdb.16.1342516809177; Tue, 17 Jul 2012 02:20:09 -0700 (PDT) Received: from mail-vc0-f178.google.com (mail-vc0-f178.google.com [209.85.220.178]) by mx.google.com with ESMTPS id l1si8035785vdv.15.2012.07.17.02.20.08 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 17 Jul 2012 02:20:09 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.178 is neither permitted nor denied by best guess record for domain of ramana.radhakrishnan@linaro.org) client-ip=209.85.220.178; Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.178 is neither permitted nor denied by best guess record for domain of ramana.radhakrishnan@linaro.org) smtp.mail=ramana.radhakrishnan@linaro.org Received: by vcbf13 with SMTP id f13so158949vcb.37 for ; Tue, 17 Jul 2012 02:20:08 -0700 (PDT) MIME-Version: 1.0 Received: by 10.52.88.234 with SMTP id bj10mr705830vdb.48.1342516808672; Tue, 17 Jul 2012 02:20:08 -0700 (PDT) Received: by 10.52.185.201 with HTTP; Tue, 17 Jul 2012 02:20:08 -0700 (PDT) Date: Tue, 17 Jul 2012 10:20:08 +0100 Message-ID: Subject: [Patch ARM] Turn on sched-pressure by default on the ARM architecture. From: Ramana Radhakrishnan To: gcc-patches Cc: Patch Tracking , Ulrich Weigand X-Gm-Message-State: ALoCoQlG5AAISLjSM7G4IX4VTAyEDPeJXNKFU8Gj8wMzAR2hx0TAlHnCKmRbn7oE+9ti+JnHXB5B Hi, After benchmarking on a number of cores and measuring good improvements across the board on the Cortex-A9 , on some cores (Cortex M) we saw no great improvements but no regressions either, we should just turn this on by default for the ARM port as in general it appears to give us a good win. Theoretically there's no reason why this will not benefit us by default on single issue machines as it prevents the first sched pass from having excessive register pressure. I have turned this on by default for O1_PLUS level of optimization so that if someone uses -O1 -fschedule-insns they get the benefit of having sched-pressure on by default. Applied. Thanks, Ramana 2012-07-17 Ramana Radhakrishnan Ulrich Weigand * common/config/arm/arm-common.c (arm_option_optimization_table): Enable -fsched-pressure by default while optimizing. * config/arm/arm.c (arm_option_override): Use the alternate scheduler pressure algorithm by default. Index: gcc/common/config/arm/arm-common.c =================================================================== --- gcc/common/config/arm/arm-common.c (revision 189562) +++ gcc/common/config/arm/arm-common.c (working copy) @@ -35,6 +35,7 @@ /* Enable section anchors by default at -O1 or higher. */ { OPT_LEVELS_1_PLUS, OPT_fsection_anchors, NULL, 1 }, { OPT_LEVELS_1_PLUS, OPT_fomit_frame_pointer, NULL, 1 }, + { OPT_LEVELS_1_PLUS, OPT_fsched_pressure, NULL, 1 }, { OPT_LEVELS_NONE, 0, NULL, 0 } }; Index: gcc/config/arm/arm.c =================================================================== --- gcc/config/arm/arm.c (revision 189562) +++ gcc/config/arm/arm.c (working copy) @@ -2009,6 +2009,11 @@ global_options.x_param_values, global_options_set.x_param_values); + /* Use the alternative scheduling-pressure algorithm by default. */ + maybe_set_param_value (PARAM_SCHED_PRESSURE_ALGORITHM, 2, + global_options.x_param_values, + global_options_set.x_param_values); + /* Register global variables with the garbage collector. */ arm_add_gc_roots (); }