Method and apparatus for converting programs
First Claim
1. A method of converting a program comprising:
- receiving a program;
detecting at least one loop statement including a branch statement within the program;
searching for a condition expression included in the branch statement from a split information table;
receiving split possibility information corresponding to the condition expression from the split information table when the condition expression exists in the split information table;
determining whether the loop statement splits into sub-loop statements which perform the same function as a function of the loop statement and among which the branch statement has been removed so as to exclude any branch statement therein;
splitting the loop statement into the sub-loop statements and removing the branch statement when it is determined that the loop statement splits; and
outputting a result of removing the branch statement,wherein the determining of whether the loop statement splits comprises;
determining that the loop statement cannot split when the condition expression does not exist in the split information table; and
determining, by using the received split possibility information, whether the loop statement splits.
1 Assignment
0 Petitions
Accused Products
Abstract
Methods and apparatuses of converting a program, which may enhance an execution speed of a computer program, are provided. The method may include receiving a program, detecting at least one loop statement including at least one branch statement within the program, determining whether the loop statement may be split into at one or more sub-loop statements which perform the same function as a function of the loop statement and from which the branch statement has been removed, splitting the loop statement into the sub-loop statements and removing the branch statement included in the loop statement if it is determined that the loop statement may be split as a result of the determination, and outputting a result of removing the branch statement.
-
Citations
18 Claims
-
1. A method of converting a program comprising:
-
receiving a program; detecting at least one loop statement including a branch statement within the program; searching for a condition expression included in the branch statement from a split information table; receiving split possibility information corresponding to the condition expression from the split information table when the condition expression exists in the split information table; determining whether the loop statement splits into sub-loop statements which perform the same function as a function of the loop statement and among which the branch statement has been removed so as to exclude any branch statement therein; splitting the loop statement into the sub-loop statements and removing the branch statement when it is determined that the loop statement splits; and outputting a result of removing the branch statement, wherein the determining of whether the loop statement splits comprises; determining that the loop statement cannot split when the condition expression does not exist in the split information table; and determining, by using the received split possibility information, whether the loop statement splits. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 18)
-
-
11. An apparatus for converting a program, the apparatus comprising:
-
a program receiver implemented by a processor and configured to receive a program; a program converter implemented by the processor and configured to detect a loop statement including a branch statement within the program, determine whether the loop statement splits into sub-loop statements which perform the same function as a function of the loop statement and among which the branch statement has been removed so as to exclude any branch statement therein, and split the loop statement into the sub-loop statements and remove the branch statement included in the loop statement when it is determined that the loop statement splits; and a program transmitter implemented by the processor and configured to output a result of removing the branch statement, wherein the program converter searches for a condition expression included in the branch statement from a split information table, determines that the loop statement cannot split when the condition expression does not exist in the split information table, receives the split possibility information corresponding to the condition expression when the condition expression exists in the split information table, and determines whether the loop statement splits based on the received split possibility information. - View Dependent Claims (12, 13, 14, 15, 16, 17)
-
Specification