1. A method of scheduling optional instructions in a compiler targeting a processor, comprising: 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, wherein the indicated limit is specified in a compilation overhead strategy selected from a set of strategies including: a no overhead strategy for optional instructions, block-wise percentage limit strategy for optional instructions, and an aggregate percentage limit strategy for optional instructions.