Program optimization
First Claim
1. A program optimization method for converting program source code written in a programming language into machine language comprising the steps of:
- analyzing a target program and detecting exception generative instructions, which may generate an exception, and exception generation detection instructions, which branches a process to an exception process when an exception occurrence condition is detected and an exception has occurred;
dividing said exception generation detection instructions into first instructions, for the detection of exception occurrence conditions, and second instructions, for branching processes to exception processes when said exception occurrence conditions are detected;
establishing dependencies among program instructions, so that when one of said exception occurrence conditions is detected the process is shifted from a first instruction to a second instruction, and so that when none of said exception occurrence conditions are detected the process is shifted from a first instruction to an exception generative instruction; and
generating compensation codes for each exception generation detection instruction.
1 Assignment
0 Petitions
Accused Products
Abstract
A program optimization method for converting program source code written in a programming language into machine language includes steps of: analyzing a target program and detecting an exception generative instruction, which may generate an exception, and exception generation detection instructions, which brunches a process to an exception process when an exception occurrence condition is detected and an exception has occurred. The method also includes steps of dividing the exception generation detection instructions into first instructions, for the detection of exception occurrence conditions, and into second instructions, for branching processes to the exception process when the exception occurrence conditions are detected; and establishing dependencies among program instructions, so that when one of the exception occurrence conditions is detected the process is shifted from a first instruction to a second instruction, and so that when none of the exception occurrence conditions are detected, the process is shifted from a first instruction to an exception generative instruction.
-
Citations
19 Claims
-
1. A program optimization method for converting program source code written in a programming language into machine language comprising the steps of:
-
analyzing a target program and detecting exception generative instructions, which may generate an exception, and exception generation detection instructions, which branches a process to an exception process when an exception occurrence condition is detected and an exception has occurred;
dividing said exception generation detection instructions into first instructions, for the detection of exception occurrence conditions, and second instructions, for branching processes to exception processes when said exception occurrence conditions are detected;
establishing dependencies among program instructions, so that when one of said exception occurrence conditions is detected the process is shifted from a first instruction to a second instruction, and so that when none of said exception occurrence conditions are detected the process is shifted from a first instruction to an exception generative instruction; and
generating compensation codes for each exception generation detection instruction. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A compiler for converting the source code for a program written in a programming language into machine language and for optimizing said program comprising:
-
a graph generator for analyzing a target program and for generating a graph showing the dependencies of operations in said program;
a graph editing unit for editing said graph and for reducing order restrictions imposed on said operations due to the occurrence of an exception; and
a code reproduction unit for generating program code that reflects said dependencies of said operations of said edited graph;
wherein said graph editing unit detects an exception generative instruction, which may generate an exception, and an exception generation detection instruction, which branches a process to an exception process when an exception occurrence condition is detected and an exception has occurred, divides said detected exception generation detection instruction into a first instruction, which detects said exception occurrence condition, and a second instruction, which branches said process to said exception process when said exception occurrence condition is detected, and establishes a dependency among the instructions, so that the process is shifted from said first instruction in said graph to said second instruction when said exception occurrence condition is detected, or so that the process is shifted from said first instruction to said exception generative instruction when an exception occurrence condition is not detected and wherein the compiler comprises an exception handler with compensation codes for each exception generation detection instruction. - View Dependent Claims (8, 9, 10, 11)
-
-
12. A compiler for converting the source code for a program written in a programming language into machine language and for optimizing the program comprising:
-
an intermediate code generator for converting said source code into editable intermediate code;
an optimization unit for optimizing said intermediate code; and
a machine language code generator for using said obtained intermediate code to generate machine language code, wherein said optimization unit analyzes said intermediate code for said program, transforms said program, within a predetermined range, so that an exception generative instruction that may generate an exception is executed before other instructions, establishes dependencies among the instructions of said program, so that, when an exception has been generated by said exception generative instruction, following the execution of said exception generative instruction the execution of instructions is inhibited, and converts an area in said program, within a predetermined range, so that the occurrence of an exception is detected when an exception is generated by at least one of multiple exception generative instructions, and a process is shifted to a corresponding exception process. - View Dependent Claims (13)
-
-
14. A computer system comprising:
-
an input device for receiving a source code of a program;
a compiler for converting said program and converting said program into a machine language code; and
a processor for executing said machine language code of said program, wherein said compiler analyzes said program, detects an exception generative instruction, which may generate an exception, and an exception generation detection instruction, which branches a process to an exception process when an exception occurrence condition is detected and an exception has occurred, divides said detected exception generation detection instruction into a first instruction, which detects said exception occurrence condition, and a second instruction, which branches said process to said exception process when said exception occurrence condition is detected, and establishes a dependency among the instructions, so that the process is shifted from said first instruction to said second instruction when said exception occurrence condition is detected, or so that the process is shifted from said first instruction to said exception generative instruction when an exception occurrence condition is not detected and wherein the computer system comprises an exception handler with compensation codes for each exception generation detection instruction. - View Dependent Claims (15)
-
-
16. A storage medium on which input means of a computer stores a computer-readable program that permits said computer to perform:
-
a process for analyzing said program, and detecting an exception generative instruction, which may generate an exception, and an exception generation detection instruction, which branches a process to an exception process when an exception occurrence condition is detected and an exception has occurred;
a process for dividing said detected exception generation detection instruction into a first instruction, which detects said exception occurrence condition, and a second instruction, which branches said process to said exception process when said exception occurrence condition is detected; and
a process for establishing a dependency among the instructions, so that the process is shifted from said first instruction to said second instruction when said exception occurrence condition is detected, or so that the process is shifted from said first instruction to said exception generative instruction when an exception occurrence condition is not detected and wherein the storage medium comprises an exception handler with compensation codes for each exception generation detection instruction. - View Dependent Claims (17)
-
-
18. A program transmission apparatus comprising:
-
storage means for storing a program that permits said computer to perform a process for analyzing said program, and detecting an exception generative instruction, which may generate an exception, and an exception generation detection instruction, which branches a process to an exception process when an exception occurrence condition is detected and an exception has occurred, a process for dividing said detected exception generation detection instruction into a first instruction, which detects said exception occurrence condition, and a second instruction, which branches said process to said exception process when said exception occurrence condition is detected, and a process for establishing a dependency among the instructions, so that the process is shifted from said first instruction to said second instruction when said exception occurrence condition is detected, or so that the process is shifted from said first instruction to said exception generative instruction when an exception occurrence condition is not detected;
a transmission mechanism for reading said program from said storage means and transmitting said program; and
an exception handler with compensation codes for each exception generation detection instruction. - View Dependent Claims (19)
-
Specification