From: Jan Hubicka <hubicka@ucw.cz>
To: Richard Biener <rguenther@suse.de>
Cc: Jan Hubicka <hubicka@ucw.cz>, gcc-patches@gcc.gnu.org
Subject: Re: Handle CONSTRUCTOR in operand_equal_p
Date: Wed, 14 Oct 2015 23:55:00 -0000 [thread overview]
Message-ID: <20151014235509.GC16831@kam.mff.cuni.cz> (raw)
In-Reply-To: <ECF2C9BA-5973-4683-A681-2654CD579DCD@suse.de>
> On October 14, 2015 6:27:02 PM GMT+02:00, Jan Hubicka <hubicka@ucw.cz> wrote:
> >Hi,
> >this patch adds the CONSTRUCTOR case discussed while back. Only empty
> >constructors are matched, as those are only appearing in gimple
> >operand.
> >I tested that during bootstrap about 7500 matches are for empty ctors.
> >There are couple hundred for non-empty probably used on generic.
> >
> >Bootstrapped/regtested x86_64-linux, OK?
> >
> >Honza
> >
> > * fold-const.c (operand_equal_p): Match empty constructors.
> >Index: fold-const.c
> >===================================================================
> >--- fold-const.c (revision 228735)
> >+++ fold-const.c (working copy)
> >@@ -2890,6 +2891,11 @@ operand_equal_p (const_tree arg0, const_
> > return operand_equal_p (TREE_OPERAND (arg0, 0), TREE_OPERAND (arg1,
> >0),
> > flags | OEP_ADDRESS_OF
> > | OEP_CONSTANT_ADDRESS_OF);
> >+ case CONSTRUCTOR:
> >+ /* In GIMPLE empty constructors are allowed in initializers of
> >+ vector types. */
>
> The comment is wrong (or at least odd),
> On gimple an empty vector constructor should be folded to a VECTOR_CST.
Hmm, I tought we have a={} i.e. for clearing whole structure.
If we never have constructors appearing as gimple operands, I guess we don't
really need the code at gimple level (because at least so far ipa-icf has
separate path to compare constructors).
Honza
>
> >+ return (!vec_safe_length (CONSTRUCTOR_ELTS (arg0))
> >+ && !vec_safe_length (CONSTRUCTOR_ELTS (arg1)));
> > default:
> > break;
> > }
>
next prev parent reply other threads:[~2015-10-14 23:55 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-14 16:27 Jan Hubicka
2015-10-14 17:26 ` Jeff Law
2015-10-14 17:35 ` Jan Hubicka
2015-10-14 18:42 ` Richard Biener
2015-10-14 23:55 ` Jan Hubicka [this message]
2015-10-15 6:57 ` Richard Biener
2015-10-21 19:10 ` Jan Hubicka
2015-10-22 7:39 ` Richard Biener
2015-10-23 5:43 ` 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=20151014235509.GC16831@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).