On 05/03/2016 08:59 AM, Segher Boessenkool wrote:
This series teaches cfgcleanup how to optimize jumps and branches to and
around return statements, after which the shrink-wrap code doesn't have
to deal with it anymore. The simplified code also catches a few more
cases.
Tested on powerpc64-linux (-m32 and -m64, all languages), and also on
x86_64-linux (actually, still in progress with the most recent version
of the patchset). Is this okay for trunk?
Looking at the outputs I see a number of jump to return replaced with
plain return, which seems like an improvement. There are random changes
in .p2align output:
@@ -207,7 +207,7 @@
jbe .L20
movl $-1, %eax
cmpl $4, %r8d
- ja .L31
+ ja .L28
pushq %r15
.cfi_def_cfa_offset 16
.cfi_offset 15, -16
@@ -288,8 +288,6 @@
.cfi_offset 14, -24
.cfi_offset 15, -16
movl $-1, %eax
- .p2align 4,,10
- .p2align 3
.L18:
addq $8, %rsp
.cfi_def_cfa_offset 56
@@ -311,7 +309,10 @@
popq %r15
.cfi_restore 15
.cfi_def_cfa_offset 8
-.L31:
+ ret
+ .p2align 4,,10
+ .p2align 3
+.L28:
rep ret
.cfi_endproc
.LFE1257:
Do you have an explanation as to why this happens? (Testcase: basically
any large file.)
Does ppc have conditional returns? If not, are you set up to test arm in
any way? Ideally you'd want to run that as well.
I think all three patches look ok, except all your fprintf calls are
misindented.
Bernd