From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2113 invoked by alias); 17 Apr 2017 15:57:21 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 2090 invoked by uid 89); 17 Apr 2017 15:57:21 -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,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 spammy=$100, rbx, nm8, rfe X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 17 Apr 2017 15:57:19 +0000 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0CFCF804E4; Mon, 17 Apr 2017 15:57:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 0CFCF804E4 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=dvlasenk@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 0CFCF804E4 Received: from localhost.localdomain (dhcp-1-136.brq.redhat.com [10.34.1.136]) by smtp.corp.redhat.com (Postfix) with ESMTP id DC8807D699; Mon, 17 Apr 2017 15:57:18 +0000 (UTC) From: Denys Vlasenko To: gcc-patches@gcc.gnu.org Cc: Denys Vlasenko , Andrew Pinski , Uros Bizjak , Bernd Schmidt Subject: [PATCH 0/3] Extend -falign-FOO=N to N[,M[,N2[,M2]]] version 7 Date: Mon, 17 Apr 2017 15:57:00 -0000 Message-Id: <20170417155716.26171-1-dvlasenk@redhat.com> X-SW-Source: 2017-04/txt/msg00721.txt.bz2 These patches are for this bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66240 "RFE: extend -falign-xyz syntax" An extended explanation is in commit message of patch 3. The test program: int g(); int f(int i) { i *= 3; while (--i > 100) { L1: if (g()) goto L1; if (g()) goto L2; } return i; L2: return 123; } "-O2" assembly before the patch: After the patch: .text .text .p2align 4,,15 .p2align 4 .globl f .globl f .type f, @function .type f, @function f: f: .LFB0: .LFB0: pushq %rbx pushq %rbx leal (%rdi,%rdi,2), %ebx leal (%rdi,%rdi,2), %ebx .p2align 4,,10 .p2align 4,,10 .p2align 3 .p2align 3 .L2: .L2: subl $1, %ebx subl $1, %ebx cmpl $100, %ebx cmpl $100, %ebx jle .L1 jle .L1 .p2align 4,,10 .p2align 4,,10 .p2align 3 .p2align 3 .L3: .L3: xorl %eax, %eax xorl %eax, %eax call g call g testl %eax, %eax testl %eax, %eax jne .L3 jne .L3 call g call g testl %eax, %eax testl %eax, %eax je .L2 je .L2 movl $123, %ebx movl $123, %ebx .L4: .L4: .L1: .L1: movl %ebx, %eax movl %ebx, %eax popq %rbx popq %rbx ret ret This is version 7 of the patch set. Changes since version 6: * Rediffed to accomodate changes introduced by recently introduced -flimit-function-alignment Changes since version 5: * Changes in rs6000, mips, alpha, visium, sh, rx, spu to accomodate new alignment options. * Explicitly list secondary alignment of 8 ("n,m,8") in x86 tables for all types of jump targets. Changes since version 4: * Deleted rather than NOPed -malign-foo=N support. * Improved behavior match with x86 8-byte subalignment for labels. Changes since version 3: * Improved documentation in invoke.texi * Fixed x86-specific calculation of default N2 value: previous version was doing it incorrectly for cross-compile