From patchwork Fri Jun 3 10:51:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wilco Dijkstra X-Patchwork-Id: 629760 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.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3rLgsN1LsXz9t7N for ; Fri, 3 Jun 2016 20:52:23 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=VvvyVfN6; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=rSjV70yt7h8+Ruib M2bbzie/dlHzU5OwW5/zLxe05fCIKe/hHVGKjJCYySqcGvj9F9DqoDPV6mLZlZxy daMbtE7FL6BVNX+JU+NnmL5wcv4fDrlI7XjCBJcgYhtRA9oMOFyC14+O74LDuQ+d RxoRbHqgpe9UPdkhVOIe8KP/1xA= 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:from :to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=default; bh=c9TkGeIO/2xxWvpPQaotvj TG6H8=; b=VvvyVfN6voVx46vSswLF+WwRKqQRe5qzE7nzVb/KExL6yeQzmaz3L5 /uQbPvXzWr9KUdiFCAuxDo60vuK40Tl/wNjwudZ971o5wQ3w/oAabstlifk160qx odgaC7R8rXw6xxdf9q8NM7VT6CO1ErdEUBrpmrJ7/750YSUxJ11Ws= Received: (qmail 60308 invoked by alias); 3 Jun 2016 10:52:16 -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 60299 invoked by uid 89); 3 Jun 2016 10:52:15 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=BAYES_00, SPF_PASS autolearn=ham version=3.3.2 spammy=4499, H*MI:outlook X-HELO: eu-smtp-delivery-143.mimecast.com Received: from eu-smtp-delivery-143.mimecast.com (HELO eu-smtp-delivery-143.mimecast.com) (207.82.80.143) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 03 Jun 2016 10:52:05 +0000 Received: from emea01-am1-obe.outbound.protection.outlook.com (mail-am1lrp0020.outbound.protection.outlook.com [213.199.154.20]) (Using TLS) by eu-smtp-1.mimecast.com with ESMTP id uk-mta-26-heSjZey_SeOzIzs3jukYSg-1; Fri, 03 Jun 2016 11:51:58 +0100 Received: from DB3PR08MB0089.eurprd08.prod.outlook.com (10.161.56.15) by DB3PR08MB0091.eurprd08.prod.outlook.com (10.161.56.17) with Microsoft SMTP Server (TLS) id 15.1.506.9; Fri, 3 Jun 2016 10:51:57 +0000 Received: from DB3PR08MB0089.eurprd08.prod.outlook.com ([10.161.56.15]) by DB3PR08MB0089.eurprd08.prod.outlook.com ([10.161.56.15]) with mapi id 15.01.0506.013; Fri, 3 Jun 2016 10:51:57 +0000 From: Wilco Dijkstra To: GCC Patches CC: nd , "philipp.tomsich@theobroma-systems.com" , "pinskia@gmail.com" , "jim.wilson@linaro.org" , "benedikt.huber@theobroma-systems.com" , Evandro Menezes Subject: [PATCH][AArch64] Increase code alignment Date: Fri, 3 Jun 2016 10:51:57 +0000 Message-ID: x-ms-office365-filtering-correlation-id: ef1d5c5d-ea5d-44d2-050c-08d38b9d156f x-microsoft-exchange-diagnostics: 1; DB3PR08MB0091; 5:6yCM20KgP2mGVn4easfA+BTKYfYzzj0qtrN1EtylTEicgNoSCl522isP1mfxs9flJHrdXRFTUceCEMVOX+2AvenrT5Jto9Du7J+rsqtzW4xcEYKn4+zv2SaVWXQUQfkBo3IVl2VbkNxQZZftZ8qT4A==; 24:5T1yZsem8OyeM3dFbA5yqu3lK4/p5t9p/9pP1zg/yeqpHlU1b+fVQZ1a0Cq/y3e27ZqLzIcVq3TWhMFy+rZto/PqbyIMfi0xadJxy6ovPxc=; 7:/ZbTHmRViHD123hNJgXFe6T69kT8pJZexYCytsUDaYfTLz5XkDBfAZkfdWa9UMjbJPcmzC5kOLs45U6VyzVeUiyBinx0PeEChrdQTGKYTKtaSlcfI1COyGRL1OnZljkSdu/6T+1ApEdtTdktIcyiSWy7bHbW79NZI7t8kjzNU8d88jHDMVUQG/fUBbzMAjdNPlIyVRhlXlL54ZO5vDVnRaWf9FRzNz0TeMcWmvHfVXA=; 20:URWryrdkEZClBbPw+JG2cqp0PxRQ6Alba4TTG02rFcsVuBnZHMqeaZivm47lTaalVVKFyEnBHTWVXM8DgF0pynVNrViU/pOAkOhZVAGgbAhpep9vzLl5YTAmKgttBgQKA2ztPZ95Tqm1Qse9NB5WqJAmetIKKoOd8FKr6xLgSEE= x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:DB3PR08MB0091; x-ld-processed: f34e5979-57d9-4aaa-ad4d-b122a662184d,ExtAddr nodisclaimer: True x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(180628864354917); x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(6055026); SRVR:DB3PR08MB0091; BCL:0; PCL:0; RULEID:; SRVR:DB3PR08MB0091; x-forefront-prvs: 0962D394D2 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(54534003)(377424004)(6116002)(122556002)(586003)(2906002)(8936002)(86362001)(3846002)(102836003)(87936001)(74316001)(5008740100001)(2900100001)(77096005)(8676002)(575784001)(4326007)(33656002)(66066001)(81166006)(10400500002)(19580405001)(19580395003)(3280700002)(50986999)(54356999)(11100500001)(229853001)(5004730100002)(5002640100001)(5003600100002)(3660700001)(189998001)(110136002)(106116001)(92566002)(9686002)(76576001); DIR:OUT; SFP:1101; SCL:1; SRVR:DB3PR08MB0091; H:DB3PR08MB0089.eurprd08.prod.outlook.com; FPR:; SPF:None; MLV:sfv; LANG:en; spamdiagnosticoutput: 1:23 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-originalarrivaltime: 03 Jun 2016 10:51:57.3689 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB3PR08MB0091 X-MC-Unique: heSjZey_SeOzIzs3jukYSg-1 Increase loop alignment on Cortex cores to 8 and set function alignment to 16. This makes things consistent across big.LITTLE cores, improves performance of benchmarks with tight loops and reduces performance variations due to small changes in code layout. It looks almost all AArch64 cores agree on alignment of 16 for function, and 8 for loops and branches, so we should change -mcpu=generic as well if there is no disagreement - feedback welcome. OK for commit? ChangeLog: 2016-05-03 Wilco Dijkstra * gcc/config/aarch64/aarch64.c (cortexa53_tunings): Increase loop alignment to 8. Set function alignment to 16. (cortexa35_tunings): Likewise. (cortexa57_tunings): Increase loop alignment to 8. (cortexa72_tunings): Likewise. diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c index 12e5017a6d4b0ab15dcf932014980fdbd1a598ee..6ea10a187a1f895a399515b8cd0da0be63be827a 100644 --- a/gcc/config/aarch64/aarch64.c +++ b/gcc/config/aarch64/aarch64.c @@ -424,9 +424,9 @@ static const struct tune_params cortexa35_tunings = 1, /* issue_rate */ (AARCH64_FUSE_MOV_MOVK | AARCH64_FUSE_ADRP_ADD | AARCH64_FUSE_MOVK_MOVK | AARCH64_FUSE_ADRP_LDR), /* fusible_ops */ - 8, /* function_align. */ + 16, /* function_align. */ 8, /* jump_align. */ - 4, /* loop_align. */ + 8, /* loop_align. */ 2, /* int_reassoc_width. */ 4, /* fp_reassoc_width. */ 1, /* vec_reassoc_width. */ @@ -449,9 +449,9 @@ static const struct tune_params cortexa53_tunings = 2, /* issue_rate */ (AARCH64_FUSE_AES_AESMC | AARCH64_FUSE_MOV_MOVK | AARCH64_FUSE_ADRP_ADD | AARCH64_FUSE_MOVK_MOVK | AARCH64_FUSE_ADRP_LDR), /* fusible_ops */ - 8, /* function_align. */ + 16, /* function_align. */ 8, /* jump_align. */ - 4, /* loop_align. */ + 8, /* loop_align. */ 2, /* int_reassoc_width. */ 4, /* fp_reassoc_width. */ 1, /* vec_reassoc_width. */ @@ -476,7 +476,7 @@ static const struct tune_params cortexa57_tunings = | AARCH64_FUSE_MOVK_MOVK), /* fusible_ops */ 16, /* function_align. */ 8, /* jump_align. */ - 4, /* loop_align. */ + 8, /* loop_align. */ 2, /* int_reassoc_width. */ 4, /* fp_reassoc_width. */ 1, /* vec_reassoc_width. */ @@ -502,7 +502,7 @@ static const struct tune_params cortexa72_tunings = | AARCH64_FUSE_MOVK_MOVK), /* fusible_ops */ 16, /* function_align. */ 8, /* jump_align. */ - 4, /* loop_align. */ + 8, /* loop_align. */ 2, /* int_reassoc_width. */ 4, /* fp_reassoc_width. */ 1, /* vec_reassoc_width. */