Vector Data Transfer Instruction for Loop Unrolling

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing vector data transfer instructions face challenges in supporting loop unrolling due to increased register pressure and overhead in initializing index registers, especially when dealing with variable vector sizes and long vectors, which limits the number of iterations that can be unrolled into a single iteration of an unrolled loop.

Innovation Solution

A vector data transfer instruction that specifies the start address of a contiguous block of addresses using a base register and an immediate offset value, where the immediate offset is defined as a multiple of the block size, allowing for efficient loop unrolling without the need to know the vector size in advance and reducing register pressure.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If traditional vector data transfer instructions are used with loop unrolling, then the number of iterations that can be unrolled is limited, but register pressure increases and initialization overhead increases

Engineering Contradiction:
Improvenumber of unrolled iterationsVSAvoidregister pressure
Core Design Contradiction:
ProductivityVSDevice complexity

Solution Approach 1:

The patent changes the addressing mode parameter from traditional base-index-offset to a simplified base-immediate-offset mode where the immediate offset is defined as a multiple of block size. This parameter change eliminates the need for index register initialization and reduces register pressure, enabling more iterations to be unrolled into a single instruction

Inventive Principle:
Principle #35Parameter changes

Solution Approach 2:

The patent extracts the index register initialization overhead from the loop unrolling process by using immediate offsets that are multiples of block size. This allows the offset to be directly encoded in the instruction without requiring separate index register setup, thereby reducing initialization overhead and register pressure

Inventive Principle:
Principle #2Taking out (Extraction)

2Productivity

If traditional vector data transfer instructions are used with loop unrolling, then the number of iterations that can be unrolled is limited, but initialization overhead increases

Engineering Contradiction:
Improvenumber of unrolled iterationsVSAvoidinitialization overhead
Core Design Contradiction:
ProductivityVSLoss of time

Solution Approach 1:

The patent performs preliminary action by pre-calculating offsets as multiples of block size and encoding them directly in the instruction as immediate values. This eliminates the need for runtime index register initialization, reducing initialization overhead and enabling more iterations to be unrolled

Inventive Principle:
Principle #10Preliminary action

Solution Approach 2:

By changing the offset parameter to be defined as a multiple of block size, the patent allows the offset to be directly encoded in the instruction without requiring separate index register setup, thereby eliminating initialization overhead

Inventive Principle:
Principle #35Parameter changes

3Productivity

If vector size is fixed in advance, then code can be optimized for specific hardware, but adaptability to different hardware implementations is reduced

Engineering Contradiction:
Improvecode optimizationVSAvoidhardware adaptability
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The patent creates a universal vector data transfer instruction that works across different hardware implementations with varying vector lengths. By using immediate offsets defined as multiples of block size, the same instruction can be executed on different hardware without modification, achieving both optimization and adaptability

Inventive Principle:
Principle #6Universality (Multi-functionality)

Solution Approach 2:

The patent introduces dynamics by allowing the block size to vary based on hardware capabilities while maintaining the same instruction format. The immediate offset is adaptively calculated as a multiple of the hardware-specific block size, enabling the same code to execute efficiently on different hardware platforms

Inventive Principle:
Principle #15Dynamics

4Manufacturing precision

If more encoding space is allocated for vector size information, then more precise control is possible, but instruction encoding space is consumed

Engineering Contradiction:
Improveaddressing precisionVSAvoidinstruction encoding space
Core Design Contradiction:
Manufacturing precisionVSDevice complexity

Solution Approach 1:

The patent changes the addressing parameter representation by defining immediate offsets as multiples of block size. This allows the offset to be encoded more compactly in the instruction, maintaining addressing precision while consuming less encoding space compared to traditional methods that require separate index register specifications

Inventive Principle:
Principle #35Parameter changes

Data Source

PatentEP3362888B1Vector data transfer instruction
Publication Date: 2023.10.25 ARM LTD
  • EP3362888B1 patent drawingFigure 1
  • EP3362888B1 patent drawingFigure 2~3C
  • EP3362888B1 patent drawingFigure 4~5

AI summary

A vector data transfer instruction is provided for triggering a data transfer between storage locations corresponding to a contiguous block of addresses and multiple data elements of at least one vector register. The instruction specifies a start address of the contiguous block using a base register and an immediate offset value specifies as a multiple of the size of the contiguous block of addresses. This is useful for loop unrolling which can help to improve performance of vectorised code by combining multiple iterations of a loop into a single iteration of an unrolled loop, to reduce the loop control overhead.