Dynamic Register Allocation for Software Pipelined Loops

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

In data processing systems with software pipelining, the lifetime of variables can cause register conflicts due to overlapping usage, leading to inefficient performance as the number of static and rotating registers is fixed, resulting in insufficient registers for program loops, which degrades system performance by generating spill/fill codes.

Innovation Solution

A method to dynamically control the number of static and rotating registers for each program loop, determining these registers to minimize spill/fill codes, and using a special register to translate logical addresses to physical addresses based on the number of rotating registers and current iteration, allowing efficient register allocation and usage.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Productivity

If software pipelining is applied to execute loops in parallel, then loop execution speed is improved, but register conflicts occur due to overlapping variable lifetimes

Engineering Contradiction:
Improveloop execution speedVSAvoidregister correctness
Core Design Contradiction:
ProductivityVSReliability

Solution Approach 1:

The patent applies dynamics by making the register allocation dynamic through iteration-dependent base register values. The base register (RRB) changes with each iteration, allowing the same logical register to map to different physical registers in different iterations. This dynamic approach enables parallel execution of software-pipelined loops while avoiding register conflicts, as each iteration uses a shifted register base that prevents lifetime overlaps.

Inventive Principle:
Principle #15Dynamics

2Device complexity

If the number of static and rotating registers is fixed in hardware, then device complexity is reduced, but register insufficiency occurs for program loops

Engineering Contradiction:
Improveregister file structureVSAvoidloop execution efficiency
Core Design Contradiction:
Device complexityVSProductivity

Solution Approach 1:

The patent segments the register file into two distinct parts: static registers and rotating registers. The static registers hold values that do not change with iteration, while the rotating registers are indexed by a base register that changes with each iteration. This segmentation allows the system to maintain a fixed hardware structure while achieving dynamic register allocation, preventing register insufficiency without increasing overall device complexity.

Inventive Principle:
Principle #1Segmentation

3Reliability

If spill/fill codes are generated to move data between registers and memory, then register conflicts are resolved, but system performance is degraded

Engineering Contradiction:
Improveregister availabilityVSAvoidsystem performance
Core Design Contradiction:
ReliabilityVSProductivity

Solution Approach 1:

The patent applies preliminary action by pre-allocating sufficient rotating registers and establishing the base register mechanism before loop execution begins. The compiler determines the required number of rotating registers and configures the register file structure in advance. This preliminary configuration ensures that enough registers are available throughout loop execution, eliminating the need for spill/fill operations and maintaining high system performance.

Inventive Principle:
Principle #10Preliminary action

Data Source

PatentUS7660970B2Register allocation method and system for program compiling
Publication Date: 2010.02.09 SAMSUNG ELECTRONICS CO LTD
  • US7660970B2 patent drawing
  • US7660970B2 patent drawing
  • US7660970B2 patent drawing

AI summary

Disclosed is a data processing system and method. The data processing method determines the number of static registers and the number of rotating registers for assigning a register to a variable contained in a certain program, assigns the register to the variable based on the number of the static registers and the number of the rotating registers, and compiles the program. Further, the method stores in the special register a value corresponding to the number of the rotating registers in the compiling operation, and obtains a physical address from a logical address of the register based on the value. Accordingly, the present invention provides an aspect of efficiently using register files by dynamically controlling the number of rotating registers and the number of static registers for a software pipelined loop, and has an effect capable of reducing the generations of spill/fill codes unnecessary during program execution to a minimum.