On 05/03/2012 05:59 AM, Richard Guenther wrote:

the type can be removed from the structure and now there would be no
wastage.  Is that reasonable?
types in ops is a bad idea (tried that once - heh), it wrecks too much generic
code.

heh, no doubt. As I Iooked at handling the generic atomics, looks like Im going to restructure it anyway a bit, and it will actually match what you were looking for in the first place. the generic functions deal with slabs of memory, so instead of a LHS, they pass in a pointer for the result. as well as any other values like the RHS expression value.

so now I expect to see something more along the lines of

gimple_atomic_base  { kind,  order }

gimple_atomic_target_base : gimple_atomic_base { type, target }

gimple_atomic : gimple_atomic_target_base { ops[] }

gimple_atomic_generic : gimple_atomic_target_base { return_val;  ops[] }


so FENCEs will be gimple_atomic_base,
all the rest of the normal ones will be gimple_atomic
and the generi oness will be gimple_atomic_generic

or something like that. It aint working yet so it isnt in stone and those are just preliminary names, but it will have a proper hierarchy of some sort. :-)

Andrew

Reply via email to