Lesson 5: Writing Linear Assembly
2-27
Compiler Optimization Tutorial
Example 2–15. Software Pipelining Feedback From the iircas4 C Code
;*–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––*
;* SOFTWARE PIPELINE INFORMATION
;*
;* Known Minimum Trip Count : 10
;* Known Max Trip Count Factor : 1
;* Loop Carried Dependency Bound(^) : 2
;* Unpartitioned Resource Bound : 4
;* Partitioned Resource Bound(*) : 5
;* Resource Partition:
;* A–side B–side
;* .L units 0 0
;* .S units 1 0
;* .D units 2 4
;* .M units 4 4
;* .X cross paths 5* 3
;* .T address paths 2 4
;* Long read paths 1 1
;* Long write paths 0 0
;* Logical ops (.LS) 2 1 (.L or .S unit)
;* Addition ops (.LSD) 4 3 (.L or .S or .D unit)
;* Bound(.L .S .LS) 2 1
;* Bound(.L .S .D .LS .LSD) 3 3
;*
;* Searching for software pipeline schedule at ...
;* ii = 5 Schedule found with 4 iterations in parallel
;* done
;*
;* Epilog not entirely removed
;* Collapsed epilog stages : 2
;*
;* Prolog not removed
;* Collapsed prolog stages : 0
;*
;* Minimum required memory pad : 16 bytes
;*
;* Minimum safe trip count : 2
;*
;*–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––*
From the feedback in the generated .asm file, we can see that the compiler
generated a suboptimal partition. Partitioning is placing operations and oper-
ands on the A side or B side. We can see that the Unpartioned Resource
Bound is 4 while the Partitioned Resource Bound is 5. When the Partitioned