This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [C11-atomic] [patch] gimple atomic statements


On 04/04/2012 04:45 AM, Richard Guenther wrote:
> I suppose you do not want to use builtins because for primitive types you
> end up with multiple statements for something "atomic"?

The primary motivation is that builtins cannot return two values.

Our current builtin returns one of the two values by reference, as
one would do from plain old C.  Even though we drop the reference
when we convert from gimple to rtl, this is not good enough to clean
up the variable we forced to a stack slot.

I suggested a specialized GIMPLE_ATOMIC opcode instead of doing a
totally generalized GIMPLE_ASSIGN_N, returning N values.


r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]