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: | loewis@informatik.hu-berlin.de (Martin v. =?iso-8859-1?q?L=F6wis?=) |
Newsgroups: | comp.compilers |
Date: | 23 May 2002 01:23:47 -0400 |
Organization: | Humboldt University Berlin, Department of Computer Science |
References: | 02-05-092 |
Keywords: | GCC, optimize |
Posted-Date: | 23 May 2002 01:23:47 EDT |
Christopher Brian Colohan <colohan+@cs.cmu.edu> writes:
> 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?
The processing of asm statements is completely controlled through the
specification of constraints (i.e. inputs, outputs, clobbers). The
compiler will apply loop unrolling. It will even remove asm statements
if they have no effect - this can happen the compiler finds that the
outputs of the asm statement are not used. Likewise, the compiler may
switch execution order to process the asm as soon as all inputs are
available, until just before the first output is needed (use volatile
asm if you want to execute the asm at exactly point where you place
it).
Regards,
Martin
Return to the
comp.compilers page.
Search the
comp.compilers archives again.