1. A method for compiling instruction code for execution in a processor having a plurality of functional units, comprising: determining a thermal constraint of the processor; and scheduling in the compiled instruction code real instructions to be executed in parallel by the plurality of functional units, wherein said scheduling is configured to prevent exceeding the thermal constraint during execution of the instruction code.