Computer system and a method for generating an optimized program code

US9513922B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-9513922-B2
Application numberUS-201214395103-A
CountryUS
Kind codeB2
Filing dateApr 20, 2012
Priority dateApr 20, 2012
Publication dateDec 6, 2016
Grant dateDec 6, 2016

How to read this patent

A practical reading order for non-experts. Skip the full description unless you need deep technical detail.

  1. Title

    What the patent document calls the invention.

  2. Abstract

    A short plain-language summary of the technical disclosure.

  3. Assignees and inventors

    Who owns or filed the patent and who is credited as inventor.

  4. Key dates

    Filing, priority, publication, and grant dates set the timeline.

  5. First independent claim

    The legal scope of protection — read this for what is actually claimed.

  6. CPC / IPC classifications

    Technology tags used to group this patent with similar filings.

  7. Citations and related patents

    Prior art links and similar publications in this corpus.

Abstract

Official abstract text for this publication.

A computer system for generating an optimized program code from a program code having a loop with an exit branch, wherein the computer system comprises a processing unit, wherein the processing unit is arranged to convert an exit instruction of the exit branch into a predicated exit instruction, wherein the processing unit is arranged to determine common dependencies within the loop, wherein the processing unit is arranged to generate modified dependencies by adding additional dependencies to the common dependencies, and wherein the processing unit is arranged to apply an algorithm that uses software pipelining for generating an optimized program code for the loop based on the modified dependencies.

First claim

Opening claim text (preview).

The invention claimed is: 1. A computer system for generating an optimized program code from a program code having a loop with an exit branch, the computer system comprising: a compiler program including an algorithm stored on a computer readable storage medium; and a processing unit coupled to the computer readable storage medium to execute the compiler program to: convert first and second non-predicated exit instructions of corresponding first and second exit branches of a program loop of program code for a target processor, each of the first and second exit branches to exit the program loop, into a corresponding first and second predicated exit instruction of the corresponding first and second exit branches, the first exit branch having a first destination; determine common dependencies for dependencies between loop instructions within the program loop; determine additional dependencies for dependencies between the first and second predicated exit instructions and the loop instructions within the program loop, the additional dependencies comprising: a first group of dependencies including dependencies between the first predicated exit instruction and a prior loop instruction of the program loop that is a write memory instruction or a write register instruction, wherein a write register of the write register instruction is used outside of the program loop, and the prior loop instruction is either non-predicated or is predicated; and a second group of dependencies comprising dependencies between the first predicated exit instruction and a following loop instruction that is a read memory instruction; generate modified dependencies based on the common dependencies and the additional dependencies to exclude dependencies that are resolved by a load speculation scheme; apply the algorithm to implement software pipelining for the program loop of the target processor based on the modified dependencies; and convert the first predicated exit instruction of the first exit branch into a third non-predicated exit instruction of a third branch having a third destination that is different than the first destination of the first exit branch after the algorithm has been applied. 2. The computer system as claimed in claim 1 , wherein the additional dependencies comprise: a third group of dependencies comprising dependencies between the predicated exit instruction and a following loop instruction that is a non-predicated write instruction. 3. The computer system as claimed in claim 2 , wherein the processing unit is arranged to replace a read instruction that is associated with the second group of dependencies by a non-faulting read instruction. 4. The computer system as claimed in claim 1 , wherein the processing unit is arranged to remove at least one of the modified dependencies based on a directive instruction that manually indicates an independency. 5. The computer system as claimed in claim 1 , wherein the processing unit is arranged to add at least one dependency to the modified dependencies based on a directive instruction that manually indicates a dependency. 6. The computer system as claimed in claim 1 , wherein the processing unit is arranged to generate a loop prolog, a loop kernel, and a loop epilog when the algorithm is completed. 7. The computer system as claimed in claim 1 , wherein the processing unit is arranged to apply further optimizing algorithms to the optimized program code. 8. The computer system as claimed in claim 1 , wherein the processing unit is arranged to check the program loop based on a test, and wherein the processing unit is arranged to apply the algorithm to the program loop when the program loop passes the test. 9. The computer system as claimed in claim 1 , wherein the processing unit is arranged to apply the algorithm to the program loop based on a directive instruction that marks the program loop for applying the algorithm. 10. A method for generating comprising: converting, by a compiler program including an algorithm stored on a computer readable storage medium executed by a processing unit coupled to the computer readable storage medium, first and second non-predicated exit instructions of corresponding first and second exit branches of a program loop of program code for a target processor, each of the first and second exit branches to exit the program loop, into a corresponding first and second predicated exit instruction of the corresponding first and second exit branches, the first exit branch having a first destination; determining common dependencies for dependencies between loop instructions within the program loop; determining additional dependencies for dependencies between the first and second predicated exit instructions and the loop instructions within the program loop, the additional dependencies comprising: a first group of dependencies including dependencies between the first predicated exit instruction and a prior loop instruction of the program loop that is a write memory instruction or a write register instruction, wherein a write register of the write register instruction is used outside of the program loop, and the prior loop instruction is non-predicated or are predicated; and a second group of dependencies comprising dependencies between the first predicated exit instruction and a following loop instruction that is a read memory instruction; generating modified dependencies based on the common dependencies and the additional dependencies to exclude dependencies that are resolved by a load speculation scheme; applying an algorithm to implement software pipelining for the program loop of the target processor based on the modified data dependencies; and converting the first predicated exit instruction of the first exit branch into a third non-predicated exit instruction of a third branch having a third destination that is different than the first destination of the first exit branch. 11. A computer system comprising: a compiler program including an algorithm stored on a computer readable storage medium; and a processing unit coupled to the computer readable storage medium to: execute the compiler program to: convert first and second non-predicated exit instructions of corresponding first and second exit branches of a program loop of program code for a target processor, each of the first and second exit branches to exit the program loop, into a corresponding first and second predicated exit instruction of the corresponding first and second exit branches, the first exit branch having a first destination; determine common dependencies for dependencies between loop instructions within the program loop; determine additional dependencies for dependencies between the first and second predicated exit instructions and the loop instructions within the program loop, the additional dependencies comprising: a first group of dependencies including dependencies between the first predicated exit instruction and a prior loop instruction of the program loop that is a write memory instruction or a write register instruction, wherein a write register of the write register instruction is used outside of the program loop, and the prior loop instruction is non-predicated or are predicated; and a second group of dependencies comprising dependencies between the first predicated exit instruction and a following loop instruction that is a read memory instruction: generate modified dependencies based on the common dependencies and the additional dependencies to exclude dependencies that are resolved by a load speculation scheme: apply the algorithm to implement software pipelining for the program loop of the target processor based on the modifie

Assignees

Inventors

Classifications

  • G06F8/4441Primary

    Reducing the execution time required by the program code · CPC title

  • G06F9/3842Primary

    Speculative instruction execution · CPC title

  • to perform conditional operations, e.g. using predicates or guards · CPC title

  • Result writeback, i.e. updating the architectural state or memory · CPC title

  • Instruction issuing, e.g. dynamic instruction scheduling or out of order instruction execution · CPC title

Patent family

Related publications grouped by family.

External sources

Frequently asked questions

Answers are generated from the same data shown on this page.

What does patent US9513922B2 cover?
A computer system for generating an optimized program code from a program code having a loop with an exit branch, wherein the computer system comprises a processing unit, wherein the processing unit is arranged to convert an exit instruction of the exit branch into a predicated exit instruction, wherein the processing unit is arranged to determine common dependencies within the loop, wherein th…
Who is the assignee on this patent?
Palalau Rene Catalin, Freescale Semiconductor Inc
What technology area does this patent fall under?
Primary CPC classification G06F8/4441. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Dec 06 2016 00:00:00 GMT+0000 (Coordinated Universal Time) (B2). Legal status and post-grant events are not shown on this page.
What related patents are in patentsdb?
We list 8 related publications on this page (citations in our corpus or others sharing the same primary CPC).