Re: Unimpressed with pg_attribute_always_inline - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Unimpressed with pg_attribute_always_inline
Date
Msg-id 7ee7a4a2-1925-779a-28c1-48e5722d060f@2ndquadrant.com
Whole thread Raw
In response to Re: Unimpressed with pg_attribute_always_inline  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Unimpressed with pg_attribute_always_inline
Re: Unimpressed with pg_attribute_always_inline
List pgsql-hackers
On 1/8/18 19:56, Tom Lane wrote:
> Peter Geoghegan <pg@bowt.ie> writes:
>> Anyway, ISTM that it should be possible to make
>> pg_attribute_always_inline have no effect in typical debug builds.
>> Wouldn't that make everyone happy?
> 
> That would improve matters, but do we have access to the -O switch
> level as an #if condition?

See __OPTIMIZE__ and __NO_INLINE__ here:
https://gcc.gnu.org/onlinedocs/cpp/Common-Predefined-Macros.html

However, at <https://gcc.gnu.org/onlinedocs/gcc/Inline.html> it says,
"GCC does not inline any functions when not optimizing unless you
specify the ‘always_inline’ attribute for the function".  So,
apparently, if the goal is to turn off inlining when not optimizing,
then we should just use the normal inline attribute.

-- 
Peter Eisentraut              http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services


pgsql-hackers by date:

Previous
From: Masahiko Sawada
Date:
Subject: Re: [HACKERS] Transactions involving multiple postgres foreign servers
Next
From: Andres Freund
Date:
Subject: Re: Unimpressed with pg_attribute_always_inline