Re: Help with implementing Wine optimization experiment

2016-08-17 Thread Daniel Santos
I'm stuck on generating a jmp to the epilogue as I can't find any examples of this. This is the summarized version of what I'm doing: rtx msabi_restore_fn, jump_insn; msabi_restore_fn = gen_rtx_SYMBOL_REF (Pmode, "__msabi_restore"); SYMBOL_REF_FLAGS (msabi_restore_fn) |= SYMBOL_FLAG_LOCAL; jump

Re: Help with implementing Wine optimization experiment

2016-08-17 Thread Daniel Santos
On 08/15/2016 05:46 AM, Florian Weimer wrote: On 08/14/2016 08:23 AM, Daniel Santos wrote: ms_abi_push_regs: pop%rax push %rdi push %rsi sub$0xa8,%rsp movaps %xmm6,(%rsp) movaps %xmm7,0x10(%rsp) movaps %xmm8,0x20(%rsp) movaps %xmm9,0x30(%rsp) mova

Re: Supporting subreg style patterns

2016-08-17 Thread Jim Wilson
On 08/16/2016 03:10 AM, shmuel gutl wrote: My hardware directly supports instructions of the form subreg:SI(reg:VEC v1,3) = SI:a1 Subregs of hard registers should be avoided. They are primarily useful for pseudo regs. Subregs that aren't lowpart subregs should be avoided also. Except w

Name of libgcc.so.1 with suffix?

2016-08-17 Thread Steve Kargl
Hi, If I run configure with "--program-suffix=6", I get gcc6, gfortran6, etc. When ldd looks for libgcc.so.1 on FreeBSD, she finds the wrong one. % cat foo.f90 program foo print *, 'Hello' end program % gfortran6 -o z foo.f90 && ./z /lib/libgcc_s.so.1: version GCC_4.6.0 required by \ /usr/loca

Re: Possible missed optimization opportunity with const?

2016-08-17 Thread lhmouse
In your example the compiler is not given the guarantee that the object 'foo' in question can only be modified through the pointer. We can make such guarantee by adding the `restrict` qualifier to the pointer, like this: const int *restrict pfoo = &foo; With -O3 on GCC 6.1 the modified code

Re: Possible missed optimization opportunity with const?

2016-08-17 Thread David Brown
On 17/08/16 02:21, Toshi Morita wrote: I was involved in a discussion over the semantics of "const" in C, and the following code was posted: #include int foo = 0; const int *pfoo = &foo; void bar (void) { foo +=3D; I assume that's a typo? } int main(void) { int a, b; a = *pfoo

Re: Using LTO-enabled libgfortran

2016-08-17 Thread Richard Biener
On Wed, Aug 17, 2016 at 8:36 AM, Thomas Koenig wrote: > Am 16.08.2016 um 20:57 schrieb Richard Biener: >> >> On August 16, 2016 7:11:26 PM GMT+02:00, Thomas Koenig >> wrote: >>> >>> What would it take to use an LTO-enabled version of gfortran? >>> >>> It could turn out to be quite useful for spee