Re: [PATCH] Eliminate n_basic_blocks macro (was Re: [PATCH] Avoid some unnecessary set_cfun calls)

2013-11-19 Thread Richard Biener
On Mon, 18 Nov 2013, David Malcolm wrote: > On Fri, 2013-11-15 at 20:38 -0500, David Malcolm wrote: > > On Wed, 2013-11-13 at 14:44 +0100, Richard Biener wrote: > > > On Wed, 13 Nov 2013, David Malcolm wrote: > > > > > > > On Wed, 2013-11-13 at 13:53 +0100, Richard Biener wrote: > > > > > On Wed,

Re: [PATCH] Eliminate n_basic_blocks macro (was Re: [PATCH] Avoid some unnecessary set_cfun calls)

2013-11-18 Thread David Malcolm
On Fri, 2013-11-15 at 20:38 -0500, David Malcolm wrote: > On Wed, 2013-11-13 at 14:44 +0100, Richard Biener wrote: > > On Wed, 13 Nov 2013, David Malcolm wrote: > > > > > On Wed, 2013-11-13 at 13:53 +0100, Richard Biener wrote: > > > > On Wed, 13 Nov 2013, Martin Jambor wrote: > > > > > > > > > H

Re: [PATCH] Avoid some unnecessary set_cfun calls

2013-11-16 Thread Richard Sandiford
Jakub Jelinek writes: > On Wed, Nov 13, 2013 at 11:27:10AM +0100, Richard Biener wrote: >> > Also, I wonder if we couldn't defer the expensive ira_init, if the info >> > computed by it is used only during RTL optimization passes (haven't >> > verified >> > it yet), then supposedly we could just r

Re: [PATCH] Avoid some unnecessary set_cfun calls

2013-11-13 Thread Richard Biener
On Wed, 13 Nov 2013, David Malcolm wrote: > On Wed, 2013-11-13 at 13:53 +0100, Richard Biener wrote: > > On Wed, 13 Nov 2013, Martin Jambor wrote: > > > > > Hi, > > > > > > On Wed, Nov 13, 2013 at 10:49:09AM +0100, Jakub Jelinek wrote: > > > > Hi! > > > > > > > > void f1 (void) {} > > > > __att

Re: [PATCH] Avoid some unnecessary set_cfun calls

2013-11-13 Thread David Malcolm
On Wed, 2013-11-13 at 13:53 +0100, Richard Biener wrote: > On Wed, 13 Nov 2013, Martin Jambor wrote: > > > Hi, > > > > On Wed, Nov 13, 2013 at 10:49:09AM +0100, Jakub Jelinek wrote: > > > Hi! > > > > > > void f1 (void) {} > > > __attribute__((target ("avx"))) void f2 (void) {} > > > __attribute_

Re: [PATCH] Avoid some unnecessary set_cfun calls

2013-11-13 Thread Martin Jambor
On Wed, Nov 13, 2013 at 01:53:00PM +0100, Richard Biener wrote: > On Wed, 13 Nov 2013, Martin Jambor wrote: > > > Hi, > > > > On Wed, Nov 13, 2013 at 10:49:09AM +0100, Jakub Jelinek wrote: > > > Hi! > > > > > > void f1 (void) {} > > > __attribute__((target ("avx"))) void f2 (void) {} > > > __att

Re: [PATCH] Avoid some unnecessary set_cfun calls

2013-11-13 Thread Richard Biener
On Wed, 13 Nov 2013, Martin Jambor wrote: > Hi, > > On Wed, Nov 13, 2013 at 10:49:09AM +0100, Jakub Jelinek wrote: > > Hi! > > > > void f1 (void) {} > > __attribute__((target ("avx"))) void f2 (void) {} > > __attribute__((target ("avx2"))) void f3 (void) {} > > __attribute__((target ("sse3"))) v

Re: [PATCH] Avoid some unnecessary set_cfun calls

2013-11-13 Thread Martin Jambor
Hi, On Wed, Nov 13, 2013 at 10:49:09AM +0100, Jakub Jelinek wrote: > Hi! > > void f1 (void) {} > __attribute__((target ("avx"))) void f2 (void) {} > __attribute__((target ("avx2"))) void f3 (void) {} > __attribute__((target ("sse3"))) void f4 (void) {} > __attribute__((target ("ssse3"))) void f5

Re: [PATCH] Avoid some unnecessary set_cfun calls

2013-11-13 Thread Richard Biener
On Wed, 13 Nov 2013, Jakub Jelinek wrote: > On Wed, Nov 13, 2013 at 11:53:32AM +0100, Richard Biener wrote: > > > So, perhaps we should just define SWITCHABLE_TARGET on > > > i?86/x86_64/powerpc* > > > (and rx if maintainer cares) and tweak it to attach somehow > > > struct target_globals * to TA

Re: [PATCH] Avoid some unnecessary set_cfun calls

2013-11-13 Thread Jakub Jelinek
On Wed, Nov 13, 2013 at 11:53:32AM +0100, Richard Biener wrote: > > So, perhaps we should just define SWITCHABLE_TARGET on i?86/x86_64/powerpc* > > (and rx if maintainer cares) and tweak it to attach somehow > > struct target_globals * to TARGET_OPTION_NODE somehow. > > A problem might be that lots

Re: [PATCH] Avoid some unnecessary set_cfun calls

2013-11-13 Thread Jakub Jelinek
On Wed, Nov 13, 2013 at 11:27:10AM +0100, Richard Biener wrote: > > Also, I wonder if we couldn't defer the expensive ira_init, if the info > > computed by it is used only during RTL optimization passes (haven't verified > > it yet), then supposedly we could just remember using some target hook > >

Re: [PATCH] Avoid some unnecessary set_cfun calls

2013-11-13 Thread Richard Biener
On Wed, 13 Nov 2013, Jakub Jelinek wrote: > On Wed, Nov 13, 2013 at 11:27:10AM +0100, Richard Biener wrote: > > > Also, I wonder if we couldn't defer the expensive ira_init, if the info > > > computed by it is used only during RTL optimization passes (haven't > > > verified > > > it yet), then su

Re: [PATCH] Avoid some unnecessary set_cfun calls

2013-11-13 Thread Richard Biener
On Wed, 13 Nov 2013, Jakub Jelinek wrote: > Hi! > > void f1 (void) {} > __attribute__((target ("avx"))) void f2 (void) {} > __attribute__((target ("avx2"))) void f3 (void) {} > __attribute__((target ("sse3"))) void f4 (void) {} > __attribute__((target ("ssse3"))) void f5 (void) {} > __attribute__

[PATCH] Avoid some unnecessary set_cfun calls

2013-11-13 Thread Jakub Jelinek
Hi! void f1 (void) {} __attribute__((target ("avx"))) void f2 (void) {} __attribute__((target ("avx2"))) void f3 (void) {} __attribute__((target ("sse3"))) void f4 (void) {} __attribute__((target ("ssse3"))) void f5 (void) {} __attribute__((target ("sse4"))) void f6 (void) {} takes about 3 seconds