public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [cxx-mem-model][PATCH 0/9] Convert i386 to new atomic optabs.
@ 2011-10-28  4:08 Richard Henderson
  2011-10-28  4:08 ` [PATCH 1/9] Fix thinko in gen_mem_thread_fence operand Richard Henderson
                   ` (10 more replies)
  0 siblings, 11 replies; 13+ messages in thread
From: Richard Henderson @ 2011-10-28  4:08 UTC (permalink / raw)
  To: gcc-patches; +Cc: amacleod, jakub

This exposed a wealth of problems in code that has heretofore never
been tested.  The fourth patch makes certain that all expansions of
compare-and-swap go through a single routine.

I've tested the whole series with and without the last patch.  So
that I've tested both the sync_ and atomic_ paths.  I've not attempted
to test if both are present.  I rather assume that'll never be the
case for any target.

Jakub, in the seventh patch, is there any good reason why OMP is
making the decision of whether or not to generate a compare-and-swap
loop?  Why shouldn't we simply always generate the __sync_fetch_op
builtin and let optabs.c generate the compare-and-swap loop?

I'm going to commit this to the branch, but an extra set of eyes
looking at the sync.md changes.


r~


Richard Henderson (9):
  Fix thinko in gen_mem_thread_fence operand.
  Handle expanding insns with 8 operands.
  Introduce and use can_compare_and_swap_p.
  Rewrite all compare-and-swap in terms of
    expand_atomic_compare_and_swap.
  Add missing atomic optab initializations.
  Update cppbuiltins for atomic-compare-and-swap.
  Update omp for new atomic optabs.
  Convert i386 backend to new atomic patterns.
  Update ChangeLogs.

 gcc/ChangeLog.mm            |   58 ++++++
 gcc/builtins.c              |   53 ++++--
 gcc/c-family/ChangeLog.mm   |    4 +
 gcc/c-family/c-cppbuiltin.c |   50 ++++--
 gcc/config/i386/i386.md     |    5 +-
 gcc/config/i386/sync.md     |  306 +++++++++++++++++---------------
 gcc/expr.h                  |    4 -
 gcc/genopinit.c             |    6 +
 gcc/omp-low.c               |   58 +++---
 gcc/optabs.c                |  422 +++++++++++++++++--------------------------
 gcc/optabs.h                |   20 ++
 11 files changed, 515 insertions(+), 471 deletions(-)

-- 
1.7.6.4

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2011-10-29 15:09 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-10-28  4:08 [cxx-mem-model][PATCH 0/9] Convert i386 to new atomic optabs Richard Henderson
2011-10-28  4:08 ` [PATCH 1/9] Fix thinko in gen_mem_thread_fence operand Richard Henderson
2011-10-28  4:08 ` [PATCH 2/9] Handle expanding insns with 8 operands Richard Henderson
2011-10-28  4:08 ` [PATCH 3/9] Introduce and use can_compare_and_swap_p Richard Henderson
2011-10-28  4:08 ` [PATCH 7/9] Update omp for new atomic optabs Richard Henderson
2011-10-28  5:11 ` [PATCH 9/9] Update ChangeLogs Richard Henderson
2011-10-28  5:11 ` [PATCH 6/9] Update cppbuiltins for atomic-compare-and-swap Richard Henderson
2011-10-28  5:20 ` [PATCH 8/9] Convert i386 backend to new atomic patterns Richard Henderson
2011-10-28  5:30 ` [PATCH 5/9] Add missing atomic optab initializations Richard Henderson
2011-10-28  5:40 ` [PATCH 4/9] Rewrite all compare-and-swap in terms of expand_atomic_compare_and_swap Richard Henderson
2011-10-28 11:29 ` [cxx-mem-model][PATCH 0/9] Convert i386 to new atomic optabs Jakub Jelinek
2011-10-28 15:25   ` Richard Henderson
2011-10-29 17:28 ` Andrew MacLeod

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).