[MLton-devel] cvs commit: card maps and machine IL semantics change

Stephen Weeks MLton@mlton.org
Mon, 29 Jul 2002 20:41:54 -0700


> I'll look at it, but this breaks the way Operands are used.  ArrayOffset
> is no longer a location, it's a value.  I'd really suggest that
> ArrayOffset become a Statement.t, which is just stuffed in a pseudo-reg.
> Or, since array subscripting probably still uses ArrayOffset, that there
> be a new Statement.t that computes an ArrayOffset (say,
> ComputeArrayOffset), which would be translated into a lea instruction in
> the codegen.

Hmm.  The reason that I made the change is that I wanted to avoid
computing the address twice, once for the cardmap and once for the
offset.  Maybe that's a stupid reason.  

I could leave ArrayOffset as it was and duplicate the address
computation, which is only going to happen for pointer stores.  Maybe
that's not too bad.  We could do benchmarks with that approach and if
it's good enough, stick with it.

Another way I could go would be to get rid of ArrayOffset altogether
and explicitly do the address computation in RSSA.  But I can only
guess that this will suffer from your other point:

> I suspect this will hurt code size and probably execution time.



-------------------------------------------------------
This sf.net email is sponsored by: Dice - The leading online job board
for high-tech professionals. Search and apply for tech jobs today!
http://seeker.dice.com/seeker.epl?rel_code=31
_______________________________________________
MLton-devel mailing list
MLton-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mlton-devel