Compiler Loop Splitting for Vector Processing
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Conventional compilers fail to optimize vector processing loops with unknown trip counts, missing opportunities for execution efficiency and hardware implementation optimization due to limitations in loop splitting and unrolling techniques.
Innovation Solution
A method that determines the presence of vector data types in loops, splits loops into multiple loops based on a splitting factor, and unrolls the second loop, allowing for efficient execution and hardware synthesis even when the trip count is unknown at compile time.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If loop unrolling is applied to vector processing loops with unknown trip counts, then execution efficiency is improved, but the compiler cannot determine how many times to unroll the loop
Solution Approach 1:
The patent divides the original loop with unknown trip count into multiple segmented loops, each with a known trip count. By splitting the loop body into several parts and creating separate loop structures, the compiler can apply unrolling to each segment independently while preserving the overall loop functionality. This segmentation allows optimization to proceed despite the unknown total iteration count.
2Productivity
If loop splitting is performed to enable unrolling, then the loop can be optimized, but the loop structure becomes more complex
Solution Approach 1:
The loop is segmented into multiple loops with known trip counts, allowing unrolling optimization. While this increases structural complexity, the segmentation enables runtime efficiency improvements that outweigh the structural overhead.
Solution Approach 2:
Instead of attempting to unroll the entire loop with unknown trip count, the patent applies unrolling partially to segmented portions where trip counts are known. This partial action approach achieves optimization without requiring complete loop transformation, balancing complexity and efficiency.
3Manufacturing precision
If the compiler applies optimizations assuming known trip count, then optimization quality improves, but incorrect assumptions lead to wrong code generation
Solution Approach 1:
The patent applies optimizations only to the extent that trip count information is available. By optimizing partial segments rather than making assumptions about the entire loop, the compiler maintains both optimization quality and code correctness, avoiding incorrect transformations while still achieving performance improvements.
Data Source
AI summary
A computer-based technique for processing an application includes determining that a loop of the application includes a reference to a data item of a vector data type. A trip count of the loop is determined to have an unknown trip count. The loop is split into a first loop and a second loop based on a splitting factor. The second loop is unrolled.


