This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Optimization of conditional access to globals: thread-unsafe?
- From: Robert Dewar <dewar at adacore dot com>
- To: skaller <skaller at users dot sourceforge dot net>
- Cc: Andi Kleen <andi at firstfloor dot org>, gcc at gcc dot gnu dot org
- Date: Mon, 29 Oct 2007 19:10:33 -0400
- Subject: Re: Optimization of conditional access to globals: thread-unsafe?
- References: <Pine.LNX.4.64.0710281753210.23011@wotan.suse.de.suse.lists.egcs> <20071028.180108.71876074.davem@davemloft.net.suse.lists.egcs> <02e701c819c7$be985620$2e08a8c0@CAM.ARTIMI.COM.suse.lists.egcs> <20071028.183401.197068473.davem@davemloft.net.suse.lists.egcs> <20071029162032.GA10611@synopsys.com.suse.lists.egcs> <47260E97.4020309@adacore.com.suse.lists.egcs> <p73zly13dwf.fsf@bingen.suse.de> <472639BF.2000204@adacore.com> <20071029200324.GA1428@one.firstfloor.org> <1193692832.28002.4.camel@rosella.wigram> <472658C6.7020700@adacore.com>
Robert Dewar wrote:
Yes, of course! unrolling loops is often an overall loss
Note also that excessive inlining often is a loss due to
increase in icache pressure. In Ada it is the style to
carefully mark inlinable routines with pragma Inline, and
we often find in Ada that use of -O3, which activates
automatic inlining, going beyond what the programmer has
asked for, is often an overall loss.