Optimizing scalar code executed on a SIMD engine by alignment of SIMD slots
Abstract
A mechanism is provided for optimizing scalar code executed on a single instruction multiple data (SIMD) engine by aligning the slots of SIMD registers. With the mechanism, a compiler is provided that parses source code and, for each statement in the program, generates an expression tree. The compiler inspects all storage inputs to scalar operations in the expression tree to determine their alignment in the SIMD registers. This alignment is propagated up the expression tree from the leaves. When the alignments of two operands in the expression tree are the same, the resulting alignment is the shared value. When the alignments of two operands in the expression tree are different, one operand is shifted. For shifted operands, a shift operation is inserted in the expression tree. The executable code is then generated for the expression tree and shifts are inserted where indicated.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 4 · Forward citations: 1.
Claims (1 — 1 Independent, 0 Dependent)
- Claim 1Independent Claim
A method, in a data processing system comprising a processor, for performing a scalar operation, comprising: identifying, by the processor, the scalar operation in source code; generating, by the processor, an expression tree for the scalar operation, wherein the expression tree has leaf nodes corresponding to scalar operands of the scalar operation; determining, by the processor, an alignment of the scalar operands in respective registers that store the scalar operands such that all of the scalar operands of the scalar operation are aligned with each other; propagating, by the processor, the
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (1 of 1 total)
| Patent | Title | Year | Citations |
|---|---|---|---|
| US 8,762,120 B1 | Model-based variable alignment in a simulated environment | 2014 | 4 |
References Cited — Backward Prior Art (4)
Non-Patent Literature (5)
- Eichenberger et al., "Efficient simd code generation for runtime alignment and length conversion," IEEE, 2005.
- Eichenberger, Alexandre E. et al., "Vectorization for SIMD Architectures with Alignment Constraints", ACM SIGPLAN Notices, vol. 39, Issue 6, May 2004, pp. 82-93.
- Final Office Action mailed Feb. 25, 2011 for U.S. Appl. No. 11/339,591; 9 pages.
- Final Office Action mailed Nov. 23, 2010 for U.S. Appl. No. 11/339,591; 10 pages.
- Interview Summary mailed Jan. 28, 2011 for U.S. Appl. No. 11/339,591; 4 pages.