Now, PPCPreIncPrep pass changes a loop to update form and update all load/store with same base accordingly.
We can do more for load/store with same base, for example, convert load/store with same base to ds/dq form. Like:
Generically, this means transforming loops like this:
for (int i = 0; i < n; ++i) { unsigned long x1 = *(unsigned long *)(p + i + 5); unsigned long x2 = *(unsigned long *)(p + i + 9); }
to look like this:
unsigned NewP = p + 5; for (int i = 0; i < n; ++i) { unsigned long x1 = *(unsigned long *)(i + NewP); unsigned long x2 = *(unsigned long *)(i + NewP + 4); }
We are also doing DS/DQ now, why we still keep the max-vars the same as before? Shall we increase it a little bit?
Looks like NO according to original comments?
So, maybe we should still keep original comments about which is a little over half of the allocatable register set, so that it will be clearer about why we choose 16 here.