x86 backend design

Matthew Fluet fluet@research.nj.nec.com
Mon, 26 Jun 2000 09:30:56 -0400 (EDT)

> I completely agree that the Operand.t datatype is too general.  I
> think it would be illuminating and would improve the backend to work
> exactly what types of suboperands can appear in arrayOffsets,
> castInts, contents, etc.  I even think it is worth it to express this
> knowledge explicitly using the ML type system.  I don't see any
> disadvantage to doing so, and it will make (translation to) your IL
> easier.

Well, like I mentioned before, the Offset variant can be specialized.  The
difficulty with arrayOffsets, contents, etc. is that there aren't
"pointer" specific variants.  arrayOffsets and Contents both expect some
pointer type (either register, global, stack offset), but with the current
types, that's hidden away in the ty: field.