From: Eric Botcazou <ebotcazou@adacore.com>
To: "Joseph S. Myers" <joseph@codesourcery.com>
Cc: gcc-patches@gcc.gnu.org, Jan Hubicka <hubicka@ucw.cz>,
Xinliang David Li <davidxl@google.com>
Subject: Re: [google]: initialize language field for clone function struct
Date: Wed, 04 May 2011 08:53:00 -0000 [thread overview]
Message-ID: <201105041044.00665.ebotcazou@adacore.com> (raw)
In-Reply-To: <Pine.LNX.4.64.1105032042320.11522@digraph.polyomino.org.uk>
> Well - the errors in variable_size aren't used by C any more (since 4.5),
> but I don't know whether any other languages use them.
Apparently not, let's remove them.
> And pending sizes are used to a limited extent for C (to handle side effects
> in sizes of array parameters, as described in the comment
>
> /* ??? Insert the contents of the pending sizes list into the function
> to be evaluated. The only reason left to have this is
> void foo(int n, int array[n++])
> because we throw away the array type in favor of a pointer type, and
> thus won't naturally see the SAVE_EXPR containing the increment. All
> other pending sizes would be handled by gimplify_parameters. */
>
> ) although it would now be better to make use of the "expr" parameter to
> grokdeclarator to replace this residual use of the pending sizes global
> list.
c-parser.c/c-decl.c are the only remaining users of pending sizes so it would
indeed be desirable to change them so as to totally get rid of pending sizes.
> Actually, it will probably be possible the eliminate the function
> completely for C; there's no good reason to do more than calling save_expr
> directly.
>
> if (TREE_CONSTANT (size))
> return size;
>
> Redundant, save_expr checks for constants.
>
> size = save_expr (size);
>
> The only necessary bit of c_variable_size once pending sizes are replaced
> by a better scheme.
>
> save = skip_simple_arithmetic (size);
>
> Premature optimization.
>
> if (cfun && cfun->dont_save_pending_sizes_p)
> return size;
>
> if (!global_bindings_p ())
> put_pending_size (save);
>
> No longer needed once pending sizes are replaced.
>
> return size;
>
> So this just becomes equivalent to save_expr.
There is the CONTAINS_PLACEHOLDER_P check in the generic case but, yes,
otherwise it's just a proxy for save_expr.
--
Eric Botcazou
next prev parent reply other threads:[~2011-05-04 8:44 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-04-30 1:34 Xinliang David Li
2011-05-02 22:13 ` Xinliang David Li
2011-05-03 10:55 ` Jan Hubicka
2011-05-03 16:15 ` Xinliang David Li
2011-05-03 16:46 ` Jan Hubicka
2011-05-03 18:55 ` Eric Botcazou
2011-05-03 19:07 ` Joseph S. Myers
2011-05-03 19:16 ` Nathan Froyd
2011-05-03 19:51 ` Joseph S. Myers
2011-05-03 20:05 ` Nathan Froyd
2011-05-03 19:52 ` Eric Botcazou
2011-05-03 20:09 ` Joseph S. Myers
2011-05-03 20:36 ` Eric Botcazou
2011-05-03 21:27 ` Joseph S. Myers
2011-05-04 8:53 ` Eric Botcazou [this message]
2011-05-04 17:27 ` Tom Tromey
2011-05-04 9:52 ` Richard Guenther
2011-05-04 10:02 ` Eric Botcazou
2011-05-04 10:30 ` Joseph S. Myers
2011-05-04 11:01 ` Eric Botcazou
2011-05-04 11:50 ` Richard Kenner
2011-05-04 12:23 ` Diego Novillo
2011-05-04 12:27 ` Richard Kenner
2011-05-04 12:31 ` Diego Novillo
2011-05-04 13:16 ` Michael Matz
2011-05-04 13:22 ` Nathan Froyd
2011-05-04 13:26 ` Diego Novillo
2011-05-04 13:39 ` Richard Kenner
2011-05-04 11:19 ` Richard Guenther
2011-05-04 12:00 ` Michael Matz
2011-05-04 12:08 ` Richard Guenther
2011-05-04 15:33 ` Eric Botcazou
2011-05-04 16:05 ` Richard Guenther
2011-05-04 17:22 ` Eric Botcazou
2011-05-05 9:07 ` Richard Guenther
2011-05-05 9:25 ` Eric Botcazou
2011-05-05 9:44 ` Richard Guenther
2011-05-05 10:22 ` Eric Botcazou
2011-05-05 11:03 ` Richard Guenther
2011-05-05 11:59 ` Eric Botcazou
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=201105041044.00665.ebotcazou@adacore.com \
--to=ebotcazou@adacore.com \
--cc=davidxl@google.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=hubicka@ucw.cz \
--cc=joseph@codesourcery.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).