From: Jan Hubicka <hubicka@ucw.cz>
To: gcc-patches@gcc.gnu.org, rguenther@suse.de
Subject: Drop TYPE_NEEDS_CONSTRUCTING checks from ipa-pure-const and tree-inline
Date: Sun, 14 Jun 2015 22:38:00 -0000 [thread overview]
Message-ID: <20150614223000.GA36639@kam.mff.cuni.cz> (raw)
Hi,
this patch removes last two remaining uses of TYPE_NEEDS_CONSTRUCTING
in the back-end. I believe those are remainders from the time we did not
gimplify as much as we do now. Alias analysis machinery already skips
checks of TYPE_NEEDS_CONSTRUCTING and thus we need to mark tree correctly
as non-readonly if it is constructed.
Incrementally I would like to remove TYPE_NEEDS_CONSTRUCTING streaming
and clear it in free_lang_data.
Bootstrapped/regtested ppc64le-linux, OK?
Honza
* ipa-pure-const.c (check_decl): Do not check TYPE_NEEDS_CONSTRUCTING.
* tree-inline.c (setup_one_parameter): Likewise.
Index: ipa-pure-const.c
===================================================================
--- ipa-pure-const.c (revision 224463)
+++ ipa-pure-const.c (working copy)
@@ -335,7 +335,7 @@
if (DECL_EXTERNAL (t) || TREE_PUBLIC (t))
{
/* Readonly reads are safe. */
- if (TREE_READONLY (t) && !TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (t)))
+ if (TREE_READONLY (t))
return; /* Read of a constant, do not change the function state. */
else
{
Index: tree-inline.c
===================================================================
--- tree-inline.c (revision 224463)
+++ tree-inline.c (working copy)
@@ -3151,18 +3151,6 @@
automatically replaced by the VAR_DECL. */
insert_decl_map (id, p, var);
- /* Even if P was TREE_READONLY, the new VAR should not be.
- In the original code, we would have constructed a
- temporary, and then the function body would have never
- changed the value of P. However, now, we will be
- constructing VAR directly. The constructor body may
- change its value multiple times as it is being
- constructed. Therefore, it must not be TREE_READONLY;
- the back-end assumes that TREE_READONLY variable is
- assigned to only once. */
- if (TYPE_NEEDS_CONSTRUCTING (TREE_TYPE (p)))
- TREE_READONLY (var) = 0;
-
/* If there is no setup required and we are in SSA, take the easy route
replacing all SSA names representing the function parameter by the
SSA name passed to function.
next reply other threads:[~2015-06-14 22:30 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-06-14 22:38 Jan Hubicka [this message]
2015-06-16 13:58 ` Richard Biener
2015-06-16 23:22 ` Jan Hubicka
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=20150614223000.GA36639@kam.mff.cuni.cz \
--to=hubicka@ucw.cz \
--cc=gcc-patches@gcc.gnu.org \
--cc=rguenther@suse.de \
/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).