Removing branching paths from a computer program
AssigneeManycore Corporation
InventorNicolas Toper
Life of this patent
Estimating the term…
Abstract
Methods and systems are described for removing branches from a computer program. The system receives code for a computer program, with the code including a number of branches. Each branch is part of a branching path and includes a jump instruction. The system executes the code, and upon encountering a branching path at runtime, the system proceeds with a number of steps. First, the system computes the result of the branch, then prefetches independent instructions outside of the branch to be executed. The system then executes one or more of the prefetched independent instructions and removes an if statement within the jump instruction of the branch at the computed result of the branching path. The system then executes the jump instruction of the branch at the computed result of the branching path.
Claims19
A method for removing branches from a computer program, comprising:
- receiving code for a computer program, wherein the code comprises a plurality of branches, the branches each being part of a branching path and comprising a jump instruction having a conditional statement;
- and
- executing the code, wherein upon encountering a branching path at runtime, the method further comprises:
- computing a result of the branch;
- prefetching a plurality of independent instructions outside of the branch to be executed;
- executing one or more of the prefetched independent instructions;
- changing the jump instruction of the branch at the computed result of the branching path;
- and
- executing the jump instruction of the branch at the computed result of the branching path.
A non-transitory computer-readable medium containing instructions for removing branching paths from a computer program, comprising:
- instructions for receiving code for a computer program, wherein the code comprises a plurality of branches, the branches each being part of a branching path and comprising a jump instruction having a conditional statement;
- and
- instructions for executing the code, wherein upon encountering a branching path at runtime, the method further comprises:
- instructions for computing a result of the branching path;
- instructions for prefetching a plurality of independent instructions outside of the branch to be executed, and
- instructions for executing one or more of the prefetched independent instructions;
- instructions for changing the jump instruction of the branch at the computed result of the branching path when the jump instruction includes a conditional statement;
- and
- instructions for executing the jump instruction of the branch at the computed result of the branching path.
Dependencies are inferred from the claim text.