









Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!










bandwidth optimizations
propagation, tree height reduction
interference graph
:
:
c = 10;
if (x != 0) {
a[x] = a[x-1] + c;
}
x++;
:
:
R1 = 10; STR R1,c R2 <- X BRnp L
R3 <- a[x-1] R2 <- c R1 <- R2+R STR R1, a[x]
R1 <- x R1 <- R1+ STR R1, x
Source Code
A
B C
D
•Block A always predecessor of Block D
•Block D always successor of Block A
•General: Control-flow analysis
Mem Op ALU Op ALU Op BR Op
many bits
•The compiler arranges instructions into VLIWs
•If an op can’t be scheduled , a NOP is inserted
•The compiler also manages delays
•Now the hardware is really simple
•Example of VLIWs include Multiflow Trace, TI C
data dependencies (using classical optimization) and
control dependencies (using techniques to be described).
can schedule. Need large regions!
dependencies.
LOOP: LD r0 <- 0(r10) LD r1 <- 4(r10) LD r2 <- 8(r10) LD r4 <- 12(r10) LD r5 <- 16(r10) ADD r10, #20, r ADD r0, r1 -> r ADD r2, r4 -> r ADD r5, r3 -> r ADD r6, r7 -> r ADD r8, r3 -> r SUB r10, r11, r BNZ r12, LOOP
The loop is
now unrolled and scheduled
[Charlesworth 1981]
for (i = 0, i < 99, i++) sum = sum + y[i]x[i]; /^ prologue^ */
LOOP: ADD r2, r3 -> r MULT r0, r1 -> r LD r0 <- x[i] LD r1 <- y[i] ; iteration ctrl BRZ LOOP
/* epilogue
LOOP: LD r0 <- x[i] LD r1 <- y[i] MULT r1, r0 -> r ADD r2, r3 -> r ; iteration ctrl BRZ LOOP
[Fisher 1981, Ellis 1985]
likely paths through the
control flow – called
Traces.
compensation code to
undo stuff within a trace.
IMPACT Superblocks
A
C
E
B
D
F