[MLton] array flattening

Stephen Weeks MLton@mlton.org
Fri, 9 Jul 2004 09:52:17 -0700

> So, I actually think the codegen would be happier with
> ArrayOffset {base: t, index: t, offset: Bytes.t, ty: Type.t}
> You can always add an immediate offset to an address, so there
> wouldn't be any problem handling an extended ArrayOffset in the
> translation.

Great.  Given this, for the first cut, I will extend the ArrayOffset
operand in Rssa and Machine.  For the SSA, I will extend
Array_{sub,update} with an offset argument (I'll probably make them
new Exp.t's instead of PrimApp's).

> However, I will suggest that if the array is flattened, then you do all
> operands as computed address followed by offset.

OK.  I'll leave this for the future to be done by CSE on the RSSA.