1. An optimization apparatus which changes an order of execution of instructions in a program to be optimized, said apparatus comprising: an exception occasion instruction detection section which detects a first instruction having a possibility to cause an exception; an assurance instruction detection section which detects a second instruction executed prior to the first instruction, the second instruction assuring that no exception of the first instruction occurs; and an execution order control section which changes a position of the first instruction in execution order so that the first instruction is executed before a conditional branch instruction for selectively executing the first instruction and after the second instruction.