I have a piece of code that compute loop bounds dynamically at runtime. For example:
for(i=0; i<100; i++) {
for(j=0; j< function1(i); j++) A();
for(j=0; j< function2(i); j++) B();
}
So the loop counts of A() and B() are unknown at compile time, but computed at runtime. Does this automatically disqualify the loop from software pipelining?
How about this code, where the loop bounds are pre-computed and stored in a 2D array M:
for(i=0; i<3; i++) {
for(j=0; j<M[i][0]; j++) A();
for(j=0; j<M[i][1]; j++) B();
}
Can TI compiler software pipeline this code?