On 03/08/13 16:18, Iain Buclaw wrote:
> On 8 March 2013 14:36, Artur Skawina <art.08...@gmail.com 
> <mailto:art.08...@gmail.com>> wrote:
> 
>     On 03/08/13 13:40, jerro wrote:
>     >> I tried modifying some trivial sources, which were using only
>     >> 'pragma(attribute, noinline)', but couldn't get them to work; the 
> compiler keeps
>     >> complaining, 'cc1d: error: unknown attribute noinline'.
>     >> Is 'import gcc.attribute; @attribute("noinline") void f() {}' supposed 
> to work?
>     >
>     > It isn't. When the syntax was changed to @attribute, all the gcc 
> attributes were disabled. If I understood correctly, the reason was that 
> those were only meant for internal GDC use. AFAIK, noinline was removed even 
> before that.
>     >
>     > Iain did say something about adding supported attributes one by one as 
> they are needed. So I guess you need to talk to him about adding noinline.
> 
>     I need them all. If D is to be an alternative to C/C++ it must support 
> everything
>     that's already available for those languages.
> 
> 
> Yet not all attributes that GCC offers actually make sense to have in D.  We 
> certainly need to have a review of each one and discuss what is most 
> important to have.  Also defining our own unique attributes along the way.  
> :o)

A missing attribute is a blocker. For example I've since tried to get my program
to build using the gcc47 branch, just to see how much performance is lost w/o 
LTO.
Only to see pages of "'flatten|always_inline|noinline' attribute directive 
ignored"
warnings... The resulting binary is *three times slower* and 50% larger than one
built with the old compiler (caused mostly by the lack of inlining, the LTO 
impact
should be much smaller). So I can't really upgrade.


>     In the specific case i tested with i need @flatten to get decent 
> performance, and
>     @noinline to have compile times measured in minutes and not hours 
> (literally, as
>     @flatten can otherwise result in practically infinite recursive inlining).
> 
>     artur
> 
> 
> 
> Raise a bug report to get those added so no one forgets.

Done. I should have probably also mentioned "always_inline", which isn't as 
critical,
but still very useful.

artur

Reply via email to