[m-dev.] poor code generation for field accesses
Fergus Henderson
fjh at cs.mu.OZ.AU
Tue Jun 4 23:48:35 AEST 2002
Currently we seem to generate poor code for field accesses,
in at least some situations.
Here's an example, from the Mercury ICFP2000 submission.
For the following source (line 256 of renderer.m),
snd(Intersection)^object_id \= IgnoreId
which is equivalent to
\+ (
snd(Intersection)^object_id = IgnoreId
),
we generate code
\+ (
V_24 <= intersection(IgnoreId, _, _, _, _), % construction
V_40 <= snd(Intersection), % function call
V_24 = V_40 % unification
)
This is bad, because the initial unification with V_24 is a
construction, which allocates memory.
--
Fergus Henderson <fjh at cs.mu.oz.au> | "I have always known that the pursuit
The University of Melbourne | of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh> | -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to: mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions: mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------
More information about the developers
mailing list