Accelerator Manual (G06.24+, H06.03+)
Accelerator Performance Issues
Accelerator Manual—527303-002
6-3
Minimizing Transitions Into TNS Code
“to make a transition into TNS code” when this occurs.
To generate an accelerated program, the Accelerator statically predicts the flow of a
program and the value of the register pointer (RP). Certain dynamic constructs in a
program can interfere with the Accelerator’s predictions and cause transitions into TNS
object code. Transitions do not affect the correctness of programs. Transitions are a
part of the TNS/R system design because some TNS programs cannot be 100%
accelerated. The Accelerator generates a note message (if you enabled the Notes
option) when it encounters code that might cause a transition.
Most transitions occur when the Accelerator cannot statically:
•
Predict jump locations
•
Predict the value of RP
•
Find statement labels
When the Accelerator cannot statically predict the location of a jump destination or the
value of the register pointer (RP), it emits a run-time check to determine the location or
value. Specifically, the Accelerator emits a run-time check to make sure its predictions
are correct if:
•
A STRP instruction does not follow a PCAL or XCAL instruction
•
The procedure contains two exit points with different return value sizes
If this run-time check proves that the prediction was incorrect, the program makes a
transition into TNS object code; otherwise, the program continues to execute RISC
code.
Once accelerated programs make transitions into TNS object code, they continue
executing TNS object code until the next call or return that is a register-exact point.
The program then automatically switches back to executing RISC code. Understanding
register-exact points helps you follow where programs can make transitions from TNS
code back to RISC code.
Register-exact points are:
•
Most procedure or subprocedure entry points. In terms of register-exact points,
FORTRAN routines and COBOL programs are equivalent to procedures; COBOL
paragraphs are equivalent to subprocedures.
•
The TNS instruction after most procedure or subprocedure calls.
•
The TNS instruction at the beginning of most labeled statements. At this point, the
Accelerator must predict an empty register stack, and the program must meet one
of the following conditions:
•
The program was accelerated with its Inspect symbols region.
•
An executable statement references the labeled statement’s address.
•
A statically generated address references a TAL CODE (CON @label)
statement that contains the labeled statement’s address.