Compiler Cache Block Allocation for Data Object Grouping

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

Existing compilers face cache conflicts and reduced hit rates in cache memory due to data items with overlapping lifetimes being laid out in the same block, leading to frequent cache misses, especially in direct mapping schemes where only one block is associated with one set.

Innovation Solution

A compiler apparatus that groups data objects based on analysis of their lifetimes and access frequencies, ensuring they are placed in different cache blocks to avoid conflicts and optimize cache usage, using directives and profile information to determine optimal block allocation.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Reliability

If data items with overlapping lifetimes are laid out in contiguous locations on main memory to increase cache hit rate, then cache hit rate is improved, but cache conflicts occur on the same block causing frequent cache misses

Engineering Contradiction:
Improvecache hit rateVSAvoidcache conflicts
Core Design Contradiction:
ReliabilityVSObject-affected harmful factors

Solution Approach 1:

The cache memory is segmented into multiple sets, each with its own block. Data items are distributed across different sets based on their lifetime characteristics, so that frequently accessed data with overlapping lifetimes reside in different sets and do not conflict within the same block.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

Different data items are assigned to different cache sets based on their specific lifetime patterns and access characteristics. This local optimization ensures that each data item is placed in the most appropriate cache location, minimizing conflicts while maximizing hit rates.

Inventive Principle:
Principle #3Local quality

2Object-affected harmful factors

If data objects are placed in different cache blocks to avoid conflicts, then cache conflicts are reduced, but cache memory utilization decreases

Engineering Contradiction:
Improvecache conflictsVSAvoidcache memory utilization
Core Design Contradiction:
Object-affected harmful factorsVSQuantity of substance

Solution Approach 1:

Data items with non-overlapping lifetimes are merged into the same cache set, allowing the cache to be fully utilized without causing conflicts. This combining approach maximizes cache capacity usage while maintaining conflict-free operation through proper lifetime-based grouping.

Inventive Principle:
Principle #5Merging (Combining)

Data Source

PatentUS7689976B2Compiler apparatus and linker apparatus
Publication Date: 2010.03.30 SOCIONEXT INC
  • US7689976B2 patent drawing
  • US7689976B2 patent drawing
  • US7689976B2 patent drawing

AI summary

A compiler capable of increasing the hit rate of the cache memory is provided that targets a computer having a cache memory, and that converts a source program into an object program. The compiler causes a computer to analyze group information that is used for grouping data objects included in the source program, and places the data objects into groups based on a result of the analysis. The compiler also causes the computer to generate an object program based on a result of the grouping, where the object program does not allow data objects belonging to different groups to be laid out in any blocks with the same set number on the cache memory.