主权项 |
1. In a computational device providing a programming environment, a method comprising:
providing a compiler directive; creating a program using the compiler directive, the creating comprising:
embedding the compiler directive in the program, where the compiler directive:
is embedded in the program prior to a compile-time analysis,appears in the program in combination with a condition associated with a function or a unit of the program, andis applied to the program during compilation of the program when the condition is satisfied; performing the compile-time analysis of the program; predicting a run-time behavior of the program based on the compile-time analysis; evaluating the condition based on the predicted run-time behavior of the program; determining whether to apply the compiler directive to the program, the determining comprising:
determining that the condition is satisfied,applying the compiler directive to the program, the applying based upon the determining that the condition is satisfied, andproviding, via the compiler directive, a command, the command specifying how to compile the program based on the predicted run-time behavior of the program, where:
the command is provided subsequent to the compile-time analysis; and generating, using the program, a compiled program based on the runtime analysis.
|