OPTIMISED COMPILATION METHOD DURING CONDITIONAL BRANCHING
First Claim
1. A compilation method of a program code in a digital device, wherein said program code comprises a main code and a branch code, in a profile driven compilation, comprising the steps of:
- determining a branch code load of the branch code, wherein said branch code load comprises a number of very long instruction words, wherein the very long instruction words comprises jump instructions in the branch codes;
determining a frequency of execution of the branch code during the execution of the preliminary compilation, wherein said preliminary compilation is first stage of said profile driven compilation;
determining an increased main code load, wherein said increased main code load comprises an additional load created by using a single decision tree with guarding operation;
determining a frequency of execution of said main code during execution of the preliminary compilation; and
deciding whether the processing load of executing the branch code is less than a threshold limit and, if so, creating a separate decision tree for the branch code,deciding whether the processing load of executing the branch code is greater than a threshold limit and, if so, using guarding operations to incorporate the branch code as part of the decision tree of the main code.
10 Assignments
0 Petitions
Accused Products
Abstract
The present invention discloses a compilation method of a program code in a digital device in a profile driven compilation. An approach for optimizing the execution of program code by providing additional intelligence to the compiler is provided, where the compiler decides whether to have single decision tree with guarded operations or multiple decision trees. The method of this invention is helpful, in reducing the overhead of conditional code branching to have an optimised program code, both in compiler driven optimisations and in manual optimisations by the programmer.
-
Citations
8 Claims
-
1. A compilation method of a program code in a digital device, wherein said program code comprises a main code and a branch code, in a profile driven compilation, comprising the steps of:
-
determining a branch code load of the branch code, wherein said branch code load comprises a number of very long instruction words, wherein the very long instruction words comprises jump instructions in the branch codes; determining a frequency of execution of the branch code during the execution of the preliminary compilation, wherein said preliminary compilation is first stage of said profile driven compilation; determining an increased main code load, wherein said increased main code load comprises an additional load created by using a single decision tree with guarding operation; determining a frequency of execution of said main code during execution of the preliminary compilation; and deciding whether the processing load of executing the branch code is less than a threshold limit and, if so, creating a separate decision tree for the branch code, deciding whether the processing load of executing the branch code is greater than a threshold limit and, if so, using guarding operations to incorporate the branch code as part of the decision tree of the main code. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
Specification