Compiler optimizations for vector operations that are reformatting-resistant

US10169012B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-10169012-B2
Application numberUS-201715801279-A
CountryUS
Kind codeB2
Filing dateNov 1, 2017
Priority dateAug 17, 2015
Publication dateJan 1, 2019
Grant dateJan 1, 2019

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.

An optimizing compiler includes a vector optimization mechanism that optimizes vector operations that are reformatting-resistant, such as source instructions that do not have a corresponding reformatting operation, sink instructions that do not have a corresponding reformatting operation, a source instruction that is a scalar value, a sink instruction that may produce a scalar value, and an internal operation that depends on lanes being in a specified order. The ability to optimize vector instructions that are reformatting-resistant reduces the number of operations to improve the run-time performance of the code.

First claim

Opening claim text (preview).

The invention claimed is: 1. An apparatus comprising: at least one processor; a memory coupled to the at least one processor; a computer program residing in the memory, the computer program including a plurality of instructions that includes at least one vector operation and that includes a plurality of reformatting-resistant vector operations that comprises a sink instruction without a corresponding reformatting operation; and a compiler residing in the memory and executed by the at least one processor, the compiler including a vector instruction optimization mechanism that optimizes at least one of the plurality of reformatting-resistant vector operations in the computer program to enhance run-time performance of the computer program. 2. The apparatus of claim 1 wherein the plurality of reformatting-resistant vector operations comprises a source instruction without a corresponding reformatting operation. 3. The apparatus of claim 1 wherein the plurality of reformatting-resistant vector operations comprises a source instruction that operates on a scalar value. 4. The apparatus of claim 1 wherein the plurality of reformatting-resistant vector operations comprises a sink instruction that can produce a scalar value. 5. The apparatus of claim 1 wherein the plurality of reformatting-resistant vector operations comprises an internal operation that depends on lanes being in a specified order. 6. The apparatus of claim 1 wherein the vector instruction optimization mechanism analyzes an existing code portion in the computer program, determines a proposed change to the existing code portion in the computer program, and when the proposed change to the existing code portion has a cost less than a cost of the existing code portion, the vector instruction optimization mechanism modifies the existing code portion with the proposed change. 7. The apparatus of claim 1 wherein the vector instruction optimization mechanism optimizes the at least one reformatting-resistant operation in the computer program by performing the steps of: (a) finding all data flow subgraphs in the computer program; (b) identifying source instructions, sink instructions, and internal instructions that are reformatting-resistant; (c) selecting a data flow subgraph; (d) determining a preferred vector element order; (e) determining a savings of removing reformatting instructions from source instructions and sink instructions that have the reformatting instructions; (f) determining a cost of inserting reformatting and other adjustment instructions at sources, sinks and internal instructions that are reformatting-resistant; (g) when the savings minus the cost is not negative, removing the reformatting instructions from source instructions and sink instructions that have the reformatting instructions, and inserting the reformatting and other adjustment instructions; and (h) when there are more data flow subgraphs to process, return to step (c) and continue processing until there are no more data flow subgraphs to process. 8. A computer-implemented method executed by at least one processor for processing a plurality of instructions in a computer program, the method comprising: providing a computer program including a plurality of instructions that includes at least one vector operation and that includes a plurality of reformatting-resistant vector operations, wherein the plurality of reformatting-resistant vector operations comprises a sink instruction without a corresponding reformatting operation; and optimizing at least one of the plurality of reformatting-resistant vector operations in the computer program to enhance run-time performance of the computer program. 9. The method of claim 8 wherein the plurality of reformatting-resistant vector operations comprises a source instruction without a corresponding reformatting operation. 10. The method of claim 8 wherein the plurality of reformatting-resistant vector operations comprises a source instruction that operates on a scalar value. 11. The method of claim 8 wherein the plurality of reformatting-resistant vector operations comprises a sink instruction that can produce a scalar value. 12. The method of claim 8 wherein the plurality of reformatting-resistant vector operations comprises an internal operation that depends on lanes being in a specified order. 13. The method of claim 8 wherein the vector instruction optimization mechanism analyzes an existing code portion in the computer program, determines a proposed change to the existing code portion in the computer program, and when the proposed change to the existing code portion has a cost less than a cost of the existing code portion, the vector instruction optimization mechanism modifies the existing code portion with the proposed change. 14. The method of claim 8 wherein the step of optimizing the at least one reformatting-resistant operation in the computer program comprises: (a) finding all data flow subgraphs in the computer program; (b) identifying source instructions, sink instructions, and internal instructions that are reformatting-resistant; (c) selecting a data flow subgraph; (d) determining a preferred vector element order; (e) determining a savings of removing reformatting instructions from source instructions and sink instructions that have the reformatting instructions; (f) determining a cost of inserting reformatting and other adjustment instructions at sources, sinks and internal instructions that are reformatting-resistant; (g) when the savings minus the cost is not negative, removing the reformatting instructions from source instructions and sink instructions that have the reformatting instructions, and inserting the reformatting and other adjustment instructions; and (h) when there are more data flow subgraphs to process, return to step (c) and continue processing until there are no more data flow subgraphs to process. 15. An article of manufacture comprising software stored on a computer readable storage medium, the software comprising: a compiler that compiles a computer program including a plurality of instructions that includes at least one vector operation and that includes a plurality of reformatting-resistant vector operations that comprises a sink instruction without a corresponding reformatting operation, the compiler comprising a vector instruction optimization mechanism that optimizes at least one of the plurality of reformatting-resistant vector operations in the computer program to enhance run-time performance of the computer program. 16. The article of manufacture of claim 15 wherein the plurality of reformatting-resistant vector operations comprises a source instruction without a corresponding reformatting operation. 17. The article of manufacture of claim 15 wherein the plurality of reformatting-resistant vector operations comprises a source instruction that operates on a scalar value. 18. The article of manufacture of claim 15 wherein the plurality of reformatting-resistant vector operations comprises a sink instruction that can produce a scalar value. 19. The article of manufacture of claim 15 wherein the plurality of reformatting-resistant vector operations comprises an internal operation that depends on lanes being in a specified order. 20. The article of manufacture of claim 15 wherein the vector instruction optimization mechanism optimizes the at least one reformatting-resistant operation in the computer program by performing the steps of: (a) finding all data flow subgraphs in th

Assignees

Inventors

Classifications

  • G06F8/4441Primary

    Reducing the execution time required by the program code · 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 US10169012B2 cover?
An optimizing compiler includes a vector optimization mechanism that optimizes vector operations that are reformatting-resistant, such as source instructions that do not have a corresponding reformatting operation, sink instructions that do not have a corresponding reformatting operation, a source instruction that is a scalar value, a sink instruction that may produce a scalar value, and an int…
Who is the assignee on this patent?
IBM
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 Jan 01 2019 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 12 related publications on this page (citations in our corpus or others sharing the same primary CPC).