From: Michael Matz <matz@suse.de>
To: Aldy Hernandez <aldyh@redhat.com>
Cc: gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [patch] 19/n: trans-mem: compiler tree/gimple stuff
Date: Fri, 04 Nov 2011 15:40:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.64.1111041553430.30317@wotan.suse.de> (raw)
In-Reply-To: <4EB2EACC.8050307@redhat.com>
Hi,
On Thu, 3 Nov 2011, Aldy Hernandez wrote:
> +/* GIMPLE_EH_ELSE <N_BODY, E_BODY> must be the sole contents of
> + a GIMPLE_TRY_FINALLY node. For all normal exits from the try block,
> + we N_BODY is run; for all exception exits from the try block,
s/we //
> +++ gcc/calls.c (.../branches/transactional-memory) (revision 180773)
> @@ -496,7 +496,60 @@ emit_call_1 (rtx funexp, tree fntree ATT
> static int
> special_function_p (const_tree fndecl, int flags)
> {
> + case BUILT_IN_TM_IRREVOCABLE:
> + case BUILT_IN_TM_GETTMCLONE_IRR:
> + case BUILT_IN_TM_MEMCPY:
> + case BUILT_IN_TM_MEMMOVE:
> + case BUILT_IN_TM_MEMSET:
Whitespace.
> @@ -1751,6 +1787,8 @@ walk_gimple_stmt (gimple_stmt_iterator *
> gcc_assert (tree_ret == NULL);
>
> /* Re-read stmt in case the callback changed it. */
> + if (wi && wi->removed_stmt)
> + return NULL;
> stmt = gsi_stmt (*gsi);
Comment belongs to the stmt assignment, not to the new if/return.
> @@ -3085,6 +3153,8 @@ get_call_expr_in (tree t)
> t = TREE_OPERAND (t, 1);
> if (TREE_CODE (t) == WITH_SIZE_EXPR)
> t = TREE_OPERAND (t, 0);
> + if (TREE_CODE (t) == VIEW_CONVERT_EXPR)
> + t = TREE_OPERAND (t, 0);
> if (TREE_CODE (t) == CALL_EXPR)
> return t;
The function get_call_expr_in is unused in our compiler (and you don't
introduce a new use), so instead of amending it, just remove it.
> Index: gcc/gimple.h
> ===================================================================
> --- gcc/gimple.h (.../trunk) (revision 180744)
> +++ gcc/gimple.h (.../branches/transactional-memory) (revision
> 180773)
> @@ -105,6 +105,7 @@ enum gf_mask {
> GF_CALL_NOTHROW = 1 << 5,
> GF_CALL_ALLOCA_FOR_VAR = 1 << 6,
> GF_CALL_INTERNAL = 1 << 7,
> + GF_CALL_NOINLINE = 1 << 8,
> GF_OMP_PARALLEL_COMBINED = 1 << 0,
...
> +/* Return true if S is a noinline call. */
> +
> +static inline bool
> +gimple_call_noinline_p (gimple s)
> +{
> + GIMPLE_CHECK (s, GIMPLE_CALL);
> + return (s->gsbase.subcode & GF_CALL_NOINLINE) != 0;
> +}
> +
> +static inline void
> +gimple_call_set_noinline_p (gimple s)
> +{
> + GIMPLE_CHECK (s, GIMPLE_CALL);
> + s->gsbase.subcode |= GF_CALL_NOINLINE;
> +}
This flag is only used by the new accessors gimple_call_noinline_p and
gimple_call_set_noinline_p. The latter is used in
trans-mem.c:ipa_tm_insert_gettmclone_call, but marked as hack. The flag
isn't tested anywhere (i.e. no calls to gimple_call_noinline_p). Hence
this whole thing is unused, presumably the hack was transformed into a
real solution :) So, don't add the flag or the accessors, and remove the
call from trans-mem.c.
Ciao,
Michael.
next prev parent reply other threads:[~2011-11-04 15:26 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-03 19:40 Aldy Hernandez
2011-11-04 10:44 ` Richard Guenther
2011-11-05 0:25 ` Aldy Hernandez
2011-11-05 2:54 ` Richard Henderson
2011-11-05 9:11 ` Richard Guenther
2011-11-05 18:14 ` Aldy Hernandez
2011-11-05 23:03 ` Richard Guenther
2011-11-06 10:10 ` Aldy Hernandez
2011-11-06 10:51 ` Richard Guenther
2011-11-05 3:11 ` Richard Henderson
2011-11-05 3:23 ` Richard Henderson
2011-11-05 10:18 ` Richard Guenther
2011-11-05 21:26 ` Aldy Hernandez
2011-11-05 23:16 ` Richard Guenther
2011-11-07 19:06 ` Richard Henderson
2011-11-07 19:46 ` Aldy Hernandez
2011-11-07 22:38 ` Richard Guenther
2011-11-06 0:51 ` Aldy Hernandez
2011-11-06 10:17 ` Richard Guenther
2011-11-07 17:47 ` Richard Henderson
2011-11-04 15:40 ` Michael Matz [this message]
2011-11-05 8:47 ` Aldy Hernandez
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=Pine.LNX.4.64.1111041553430.30317@wotan.suse.de \
--to=matz@suse.de \
--cc=aldyh@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
/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).