public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Extend -falign-FOO=N to N[,M[,N2[,M2]]] version 8
@ 2017-04-18 18:30 Denys Vlasenko
  2017-04-18 18:30 ` [PATCH 2/3] Temporary remove "at least 8 byte alignment" code from x86 Denys Vlasenko
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Denys Vlasenko @ 2017-04-18 18:30 UTC (permalink / raw)
  To: gcc-patches
  Cc: Denys Vlasenko, Andrew Pinski, Uros Bizjak, Bernd Schmidt,
	Sandra Loosemore

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 8 of the patch set.

Changes since version 7:

* Documentation fixes

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

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2018-02-12 10:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-18 18:30 [PATCH 0/3] Extend -falign-FOO=N to N[,M[,N2[,M2]]] version 8 Denys Vlasenko
2017-04-18 18:30 ` [PATCH 2/3] Temporary remove "at least 8 byte alignment" code from x86 Denys Vlasenko
2017-04-18 18:30 ` [PATCH 1/3] Remove support for obsolete x86 -malign-foo options Denys Vlasenko
2017-05-06  7:22   ` Uros Bizjak
2017-05-11 12:24     ` Denys Vlasenko
2018-02-12 10:07     ` Martin Liška
2017-04-18 18:46 ` [PATCH 3/3] Extend -falign-FOO=N to N[,M[,N2[,M2]]] Denys Vlasenko
2017-04-18 19:12   ` Sandra Loosemore
2017-05-05 14:40 ` [PATCH 0/3] Extend -falign-FOO=N to N[,M[,N2[,M2]]] version 8 Denys Vlasenko

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).