To provide a method for rewriting an instruction code whose executing efficiency is improved.
A compiler for compiling a source program to an execution program generates a name reference and solution calling instruction for calling a name solution procedure for solving a name which can be solved only at the time of program execution and an instruction without any side effect having name identification information for identifying the name which can be solved only at the time of program execution and the number of a target register for storing a solved name. Then, the instruction without any side effect generated by the compiler is distributed to a delayed slot. Then, at the time of executing an execution program, the name solution procedure is called according to the name reference and solution calling instruction, and the name reference and solution calling instruction and the instruction without any side effect are rewritten into an instruction for storing a value obtained by solving the name in the target register based on the instruction without any side effect.