[m-rev.] for review: enumeration argument packing

Julien Fischer juliensf at csse.unimelb.edu.au
Mon Jul 4 16:26:40 AEST 2011


On Mon, 4 Jul 2011, Julien Fischer wrote:

> On Mon, 4 Jul 2011, Peter Wang wrote:
>
>> On 2011-07-01, Julien Fischer <juliensf at csse.unimelb.edu.au> wrote:
>>> 
>>> Hi Peter,
>>> 
>>> On Mon, 27 Jun 2011, Peter Wang wrote:
>>> 
>>>> Branches: main
>>>> 
>>>> Pack consecutive enumeration arguments in discriminated union types into 
>>>> a
>>>> single word to reduce cell sizes.  Argument packing is only enabled on C
>>>> back-ends, and reordering arguments to improve opportunities for packing 
>>>> is
>>>> not yet attempted.  The RTTI implementations for other back-ends will 
>>>> need to
>>>> be updated, but that is best left until after any argument reordering 
>>>> change.
>>>> 
>>>> Modules which import abstract enumeration types are notified so by 
>>>> writing
>>>> declarations of the form:
>>>> 
>>>> 	:- type foo where type_is_abstract_enum(NumBits).
>>>> 
>>>> into the interface file for the module which defines the type.
>>> 
>>> I have a couple of questions regarding this:
>>> 
>>> * Is this option safe in the presence (possibly, by disabling it) of
>>>   --cross-compiling?
>> 
>> I don't know what effect --cross-compiling should have, if any.
>
> --cross-compiling disables all optimizations that rely on features of
> a specific machine, e.g. the word size of that machine.
>
>> The packing uses the --bits-per-word option to know how many arguments
>> can be packed together.
>
> In which case, --cross-compiling should imply --no-allow-argument
> packing.

Now I come to think about it, I'm wrong about that.  When building the
source distribution we force bits-per-word to be 32, so it should
be ok.

Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
Post messages to:       mercury-reviews at csse.unimelb.edu.au
Administrative Queries: owner-mercury-reviews at csse.unimelb.edu.au
Subscriptions:          mercury-reviews-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the reviews mailing list