This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: optimization hints?


> 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. |


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]