Compiler Array Access Pattern Alignment for SIMD Memory Penalties

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing multimedia extensions for general-purpose processors face performance penalties due to unaligned memory loads and register spills in array-based programs, which are common in SIMD operations.

Innovation Solution

A method and compiler logic that identify and analyze array access patterns, calculate distances between them, and share address calculations to optimize alignment, reducing register pressure and memory penalties by executing fully aligned portions of code.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If array-based programs are used for multimedia extensions, then programming flexibility is improved, but memory penalties due to unaligned loads increase

Engineering Contradiction:
Improveprogramming flexibilityVSAvoidmemory penalties
Core Design Contradiction:
Adaptability or versatilityVSLoss of energy

Solution Approach 1:

The patent segments the code into aligned and unaligned portions, allowing the aligned portion to be executed with optimized memory access patterns while the unaligned portion handles edge cases. This segmentation enables the system to maintain programming flexibility while minimizing memory penalties by executing aligned code paths when possible.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent applies different alignment strategies to different portions of the code. The aligned portion uses strict alignment for optimal performance, while the unaligned portion handles cases where alignment cannot be maintained. This local differentiation allows the system to maximize performance where possible without sacrificing programming flexibility entirely.

Inventive Principle:
Principle #3Local quality

2Adaptability or versatility

If array-based programs are used for multimedia extensions, then programming flexibility is improved, but stack spills and refills increase

Engineering Contradiction:
Improveprogramming flexibilityVSAvoidstack spills and refills
Core Design Contradiction:
Adaptability or versatilityVSLoss of energy

Solution Approach 1:

The patent segments the execution into aligned and unaligned paths, where the aligned path is optimized to minimize register pressure and stack operations. By separating the code paths, the system can maintain programming flexibility while reducing stack spills and refills in the primary execution path.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent changes the alignment parameter of memory accesses in the aligned portion, transforming unaligned accesses into aligned ones. This parameter change eliminates stack spills and refills associated with misaligned memory operations while preserving the flexibility of the original array-based programming model.

Inventive Principle:
Principle #35Parameter changes

3Loss of energy

If aligned code is executed, then memory penalties are reduced, but code complexity increases

Engineering Contradiction:
Improvememory penaltiesVSAvoidcode complexity
Core Design Contradiction:
Loss of energyVSDevice complexity

Solution Approach 1:

The patent segments the original code into aligned and unaligned portions, allowing the aligned portion to benefit from optimized memory access while the unaligned portion handles edge cases. This segmentation manages code complexity by organizing the code into distinct, manageable sections with clear purposes.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The patent extracts the alignment optimization into a separate aligned portion of the code, isolating the complexity of alignment handling from the main execution path. This extraction allows the primary code to benefit from simplified memory access patterns while the extracted portion handles the complexity of alignment transitions.

Inventive Principle:
Principle #2Taking out (Extraction)

Data Source

PatentUS8555030B2Creating multiple versions for interior pointers and alignment of an array
Publication Date: 2013.10.08 ADVANCED MICRO DEVICES INC
  • US8555030B2 patent drawing
  • US8555030B2 patent drawing
  • US8555030B2 patent drawing

AI summary

A device identifies array accesses of variables in a program code that includes multiple arrays, and identifies array access patterns for one of the array accesses. The device also determines an order of the array access patterns identified for the array accesses, and calculates, based on the order, distances between the array access patterns. The device further shares address calculations amongst the array accesses associated with array access patterns with one or more of the distances that are equivalent.