摘要 |
The present invention optimizes program execution by reducing previous restrictions for an exception generative instruction for another instruction, so that the parallelisms of the instructions of a program, including exception generative instructions, can be effectively obtained. Preferably, the novel compiler comprises: a DAG (directed acyclic graph) generator for analyzing quadruple intermediate code in a target program and for generating a DAG; a DAG editing unit for editing the DAG and for reducing for the operators order restrictions due to the occurrence of an exception; and a quadruple intermediate code reproduction unit for generating quadruple intermediate code which reflects the structure of the obtained DAG. An exception generative instruction and an exception generation detection instruction are thus detected. The exception generation detection instruction is divided into a first instruction, which detects the exception occurrence condition, and a second instruction, which branches the process for the exception process. A dependency is set among the instructions, so that the process is shifted from the first instruction to the second instruction when the exception occurrence condition is detected, or so that the process is shifted from the first instruction to the exception generative instruction when the exception occurrence condition is not detected.
|