[m-dev.] [zs at cs.mu.oz.au: Re: tabled_for_io interacts badly with c code which contains labels]

Zoltan Somogyi zs at cs.mu.OZ.AU
Tue Aug 9 12:33:14 AEST 2005


I accidentally sent this to Ian only.

Zoltan.

----- Forwarded message from Zoltan Somogyi <zs at cs.mu.oz.au> -----

Date: Tue, 9 Aug 2005 12:30:56 +1000
From: Zoltan Somogyi <zs at cs.mu.oz.au>
To: Ian MacLarty <maclarty at cs.mu.OZ.AU>
Subject: Re: tabled_for_io interacts badly with c code which contains labels

On 08-Aug-2005, Ian MacLarty <maclarty at cs.mu.OZ.AU> wrote:
> Zoltan, could we wrap the original code in a procedure,

In many cases, the body is much cheaper to execute than a function call,
so that would be a significant performance loss. However, there is no reason
why the author of the foreign_proc can't use that technique where it is
needed.

> or change the 
> I/O tabling transformation somehow to overcome this problem?

We could modify the transformation to put something like
"#define MR_IO_TABLING_COPY_NUM 1" before one copy and
"#define MR_IO_TABLING_COPY_NUM 2" before the other, and let the C code
include that macro in the label name.

Zoltan.

----- End forwarded message -----
--------------------------------------------------------------------------
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