A method of scheduling optional instructions in a compiler targets a
processor. The scheduling includes indicating a limit on the additional
processor computations that are available for executing an optional code,
generating one or more required instructions corresponding to a source
code and one or more optional instructions corresponding to the optional
code used with the source code and scheduling all of the one or more
required instructions with as many of the one or more optional
instructions as possible without exceeding the indicated limit on the
additional processor computations for executing the optional code.