Compiler method for generating instructions for vector operations on a multi-endian processor

US9588746B2 · US · B2

Patent metadata
FieldValue
Publication numberUS-9588746-B2
Application numberUS-201414576391-A
CountryUS
Kind codeB2
Filing dateDec 19, 2014
Priority dateDec 19, 2014
Publication dateMar 7, 2017
Grant dateMar 7, 2017

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 compiler includes a vector instruction processing mechanism that generates instructions for vector instructions in a way that assures correct operation in a bi-endian environment, wherein the processor architecture contains instructions with an inherent endian bias. The compiler uses a code generation endian preference that is specified by the user, and that determines a natural element order. When the compiler processes a computer program, it generates instructions for vector operations by determining whether the vector instruction has an endian bias that matches the specified endian preference (i.e., the inherent element order of the vector instruction matches the natural element order). When the vector instruction has no endian bias, or when the endian bias of the vector instruction matches the specified endian preference, the compiler generates one or more instructions for the vector instruction as it normally does. When the endian bias of the vector instruction does not match the specified endian preference, the compiler generates instructions to fix the mismatch.

First claim

Opening claim text (preview).

The invention claimed is: 1. A computer-implemented method executed by at least one processor for a compiler to process a plurality of instructions in a computer program, the method comprising: the compiler reading the plurality of instructions; the compiler determining an endian preference that defines a natural element order for vector instructions in the plurality of instructions; and the compiler determining when a vector instruction in the plurality of instructions has an inherent element order that is a mismatch to the natural element order, and in response, generating at least one instruction to fix the mismatch. 2. The method of claim 1 further comprising determining when the vector instruction specifies a first element number, and in response, generating an instruction that references a second element number computed by subtracting the first element number from a number of elements in the vector minus one. 3. The method of claim 1 further comprising determining when the vector instruction specifies odd elements, and in response, generating an instruction that specifies even elements, and determining when the vector instruction specifies even elements, and in response, generating an instruction that specifies odd elements. 4. The method of claim 1 further comprising determining when the vector instruction is a vector load instruction, and in response, generating a vector element reverse instruction after the vector load instruction. 5. The method of claim 1 further comprising determining when the vector instruction is a vector store instruction, and in response, generating a vector element reverse instruction before the vector store instruction. 6. The method of claim 4 wherein each vector element reverse instruction reverses order of a plurality of elements of a vector register. 7. The method of claim 6 wherein the plurality of elements of the vector register comprises one of: a plurality of bytes; a plurality of halfwords; a plurality of words; a plurality of double-words; a plurality of quadwords; and a plurality of elements larger than quadwords. 8. The method of claim 1 further comprising determining when the vector instruction is an instruction that has input arguments treated as an extended vector, and in response, generating a vector instruction with an inverted order of the input arguments. 9. The method of claim 1 further comprising determining when the vector instruction refers to a high half of at least one vector register, and in response, generating an instruction that refers to a low half of the at least one vector register, and determining when the vector instruction refers to a low half of at least one vector register, and in response, generating an instruction that refers to the high half of the at least one vector register. 10. A computer-implemented method executed by at least one processor for a compiler to process a plurality of instructions in a computer program, the method comprising the steps of: determining an endian preference that defines a natural element order for vector instructions in the plurality of instructions; selecting a vector instruction in the plurality of instructions; when the selected vector instruction has an inherent element order that does not match the natural element order: determining when the vector instruction specifies a first element number, and in response, generating an instruction that references a second element number computed by subtracting the first element number from a number of elements in the vector minus one; determining when the vector instruction specifies odd elements, and in response, generating an instruction that specifies even elements; determining when the vector instruction specifies even elements, and in response, generating an instruction that specifies odd elements; determining when the vector instruction is a vector load instruction, and in response, generating a vector element reverse instruction after the vector load instruction; determining when the vector instruction is a vector store instruction, and in response, generating a vector element reverse instruction before the vector store instruction; wherein each vector element reverse instruction reverses order of a plurality of elements of a vector register, wherein the plurality of elements of the vector register comprises one of: a plurality of bytes; a plurality of halfwords; a plurality of words; and a plurality of double-words; determining when the vector instruction is an instruction that has input arguments treated as an extended vector, and in response, generating a vector instruction with an inverted order of the input arguments; determining when the vector instruction refers to a high half of at least one vector register, and in response, generating an instruction that refers to a low half of the at least one vector register; and determining when the vector instruction refers to the low half of at least one vector register, and in response, generating an instruction that refers to the high half of the at least one vector register.

Assignees

Inventors

Classifications

  • G06F8/445Primary

    Exploiting fine grain parallelism, i.e. parallelism at instruction level (run-time instruction scheduling G06F9/3836) · CPC title

  • Instruction analysis, e.g. decoding, instruction word fields · CPC title

  • G06F8/41Primary

    Compilation · CPC title

  • Instructions to perform operations on packed data, e.g. vector, tile or matrix operations · 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 US9588746B2 cover?
A compiler includes a vector instruction processing mechanism that generates instructions for vector instructions in a way that assures correct operation in a bi-endian environment, wherein the processor architecture contains instructions with an inherent endian bias. The compiler uses a code generation endian preference that is specified by the user, and that determines a natural element order…
Who is the assignee on this patent?
IBM
What technology area does this patent fall under?
Primary CPC classification G06F8/445. Mapped technology areas include Physics.
When was this patent published?
Publication date Tue Mar 07 2017 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 7 related publications on this page (citations in our corpus or others sharing the same primary CPC).