This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: optimization hints?
- To: egcs at egcs dot cygnus dot com
- Subject: Re: optimization hints?
- From: "Alex Rosenberg" <alexr at spies dot com>
- Date: Fri, 11 Jun 1999 16:49:48 -0700
> just the fact that I don't expect an error (poll() returning -1),
> I was hoping to be able to tell it that this code isn't likely to
> execute and perhaps even move it someplace else to maximize the
> instruction cache utilization of my code.
Apple's MrC compiler has two pragmas for this:
#pragma seldom
This moves the marked block to the end of the function (after the exit
node).
#pragma outofline
This puts the marked block in a seperate GL function in the XCOFF, which
results in placement at the end of the file by the linker.
Both would be straight-forward to implement in egcs, but pragmas have been
shunned in the past. No keyword alternative approach comes to mind.
A particularly useful variant would be to automatically move C++ catch
blocks.
+------------------------------------------------------------+
| Alexander M. Rosenberg <mailto:alexr@_spies.com> |
| Nobody cares what I say. Remove the underscore to mail me. |