Next: Limitations
Up: Generation of Prefetch Thread
Previous: Intra-Procedural Dependency Analysis
To generate the prefetch thread for an application program
that contains multiple procedures, inter-procedural dependency
analysis is required. It propagates the information on whether a
variable is I/O related through procedure call arguments,
return values, and global variables. This propagation
proceeds as follows:
- For each procedure ,
let
be one of the procedures
that calls with actual parameters
. If any actual parameter
is I/O related in , and it is a pointer (i.e.,
the value it points to can be changed inside ), then mark the
object points to in
as I/O related.
If stores the
return value from in variable , and
is I/O related in , then the variable in
corresponding to the return value is considered I/O related.
- For each procedure
,
let be a procedure that calls
with actual parameters
. If a formal parameter
is I/O related in , its corresponding
actual parameter is considered I/O
related in .
- All global variables
that are I/O related are
I/O related within all procedures.
The above algorithm only needs to be applied to the function call graph once
if there are no recursive function calls. It recursion occurs, the algorithm
may need to be applied more than once until the extracted code converges.
Next: Limitations
Up: Generation of Prefetch Thread
Previous: Intra-Procedural Dependency Analysis
chuan-kai yang
2002-04-15