Related articles |
---|
Interaction between optimizer and inline asm in gcc? colohan+@cs.cmu.edu (Christopher Brian Colohan) (2002-05-17) |
Re: Interaction between optimizer and inline asm in gcc? loewis@informatik.hu-berlin.de (2002-05-23) |
Re: Interaction between optimizer and inline asm in gcc? sam@zoy.org (2002-05-23) |
Re: Interaction between optimizer and inline asm in gcc? journeyman@compilerguru.com (2002-05-23) |
Re: Interaction between optimizer and inline asm in gcc? kg_russell@yahoo.co.uk (2002-05-23) |
From: | sam@zoy.org (Samuel Hocevar) |
Newsgroups: | comp.compilers |
Date: | 23 May 2002 01:28:58 -0400 |
Organization: | da ZoY - http://zoy.org/ |
References: | 02-05-092 |
Keywords: | GCC, optimize |
Posted-Date: | 23 May 2002 01:28:58 EDT |
On 17 May 2002 00:27:03 -0400,
Christopher Brian Colohan <colohan+@cs.cmu.edu> wrote:
> I was wondering if anyone has looked into the impact of doing this on
> gcc's optimizer: in other words, how conservatively does gcc treat
> inline asm statements? For example, would inserting such a statement
> inhibit loop unrolling?
gcc doesn't touch code inside an inline statement, but if you don't
declare it volatile or declare side effects as constraints, it may
move the statement around within the function. As for loop unrolling,
I have seen gcc unroll some of my loops containing inline asm, but
you'd better do it by hand if you really need performance.
Regards,
Sam.
--
Samuel Hocevar <sam@zoy.org> <http://sam.zoy.org/>
free DVD and MPEG support for Linux, Unix, Windows, BeOS and QNX:
VideoLAN <http://www.videolan.org/>
Return to the
comp.compilers page.
Search the
comp.compilers archives again.