A low-level quadruple-based IR with explicit pointers.

Low-quad form allows pointer-based optimizations that are impossible to perform in hi-quad form. As an example, low-quad form allows the optimization of:

void foo(int arr[]) { for (int i=0; i<arr.length; i++) arr[i] = 42; } which is implemented as something like: void foo(int arr[]) { for (int i=0; i<arr.length; i++) *(arr+i) = 42; } to the more efficient: void foo(int arr[]) { for (int *i=arr; i<arr+arr.length; i++) *i = 42; } Note that there is also pointer-scaling going on here which it is difficult to write in C.

Note that a harpoon.Analysis.Maps.Derivation must be maintained in low-quad form to allow compiler-supported garbage collection in the back-end. @author C. Scott Ananian