Identification Of Leaf Functions - Intel i960 User Manual

Processor compiler
Hide thumbs Also See for i960:
Table of Contents

Advertisement

Optimization

Identification of Leaf Functions

The compiler identifies functions that can be called with branch-and-link
instruction sequences. The compiler then generates the correct function
prologue, epilogue, and symbol table information for the assembler.
When this function is called, the compiler generates the
instruction. The linker optimizes the call to use branch-and-link
instruction sequences. A function called with branch-and-link instruction
sequences does not allocate a new stack frame, does not create a new
register frame, and thus executes faster than a function invoked with a
instruction.
call
Neither the compiler nor the linker can absolutely identify a function
called indirectly through a function pointer as a leaf function. Therefore,
the compiler does not optimize such indirectly called functions to branch-
and-link instruction sequences.
For an explanation of the two entry points generated for leaf procedures,
see the i960 Processor Assembler User's Guide and the i960 Processor
Software Utilities User's Guide.
Inline Function Expansion
Using calls to a function within a program usually takes less space but
requires longer execution time than repeating the function body each time
it is needed. Inline function expansion replaces a function call with the
called function body expanded in place. The inlining optimization
increases speed by eliminating call overhead and creates opportunities for
further optimization.
The compiler provides user-controllable inlining using pragma
and with the
__inline
level 2, or gcc960 optimization level 3, the compiler performs more
automatic procedure inlining, based on heuristics.
storage class. Additionally, at ic960 optimization
11
pseudo-
callj
,
inline
11-11

Advertisement

Table of Contents
loading

Table of Contents