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: [PATCH, MIPS] Add most common atomic patterns


Richard Henderson <rth@redhat.com> writes:
> On 2012-06-12 22:50, Maxim Kuvyrkov wrote:
>> The third patch is a small optimization to alleviate
>> __atomic_compare_exchange[_n] builtins being a use-one-for-all
>> solutions.  These builtins return both boolean "success" and "oldval"
>> results.  As most cases use only one of the results, this
>> optimizations looks at REG_UNUSED notes to determine if instructions
>> to set these results can be omitted.
>
> If you split the pattern, similar to how it's handled on Alpha,
> and normal dead-code elimination will handle this.

One hitch with that is that we need a branch-likely instruction for
-mfix-r10000.  I suppose we could fudge it with a special (probably
unspec_volatile) branch pattern, but I'm nervous about doing something
so unusual for such a corner case.

Richard


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