public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Henderson <rth@redhat.com>
To: gcc-patches@gcc.gnu.org
Cc: amacleod@redhat.com,	jakub@redhat.com
Subject: [cxx-mem-model][PATCH 0/9] Convert i386 to new atomic optabs.
Date: Fri, 28 Oct 2011 04:08:00 -0000	[thread overview]
Message-ID: <1319774858-9181-1-git-send-email-rth@redhat.com> (raw)

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

             reply	other threads:[~2011-10-28  4:08 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-28  4:08 Richard Henderson [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1319774858-9181-1-git-send-email-rth@redhat.com \
    --to=rth@redhat.com \
    --cc=amacleod@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jakub@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).