From: Richard Guenther <rguenther@suse.de>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH] Fix PR34148 a bit
Date: Tue, 20 Nov 2007 14:07:00 -0000 [thread overview]
Message-ID: <Pine.LNX.4.64.0711201332130.4148@zhemvz.fhfr.qr> (raw)
This fixes the huge memory and compile-time regression on qmake files
by noting that it is pointless to generate SFTs for single-element
structures (and thus in this case unpartitionable SFTs).
This reduces compile-time and memory-usage from >1.5GB and (no idea,
>2min) to <200MB and 20s.
Another possible optimization I'll post/test seperately is to only
treat SFT_UNPARTITIONABLE_P as non-partitionable if they are (still)
addressable.
Bootstrap & regtest on x86_64-unknown-linux-gnu running, I'll apply
this if it succeeds.
Richard.
2007-11-20 Richard Guenther <rguenther@suse.de>
PR tree-optimization/34148
* tree-ssa-structalias.c (create_variable_info_for): Do not use
field-sensitive PTA for single-element structures.
* tree-ssa-alias.c (create_overlap_variables_for): Do not create
SFTs for single-element structures.
Index: tree-ssa-structalias.c
===================================================================
*** tree-ssa-structalias.c (revision 130288)
--- tree-ssa-structalias.c (working copy)
*************** create_variable_info_for (tree decl, con
*** 4441,4446 ****
--- 4441,4447 ----
&& !notokay
&& !vi->is_unknown_size_var
&& var_can_have_subvars (decl)
+ && VEC_length (fieldoff_s, fieldstack) > 1
&& VEC_length (fieldoff_s, fieldstack) <= MAX_FIELDS_FOR_FIELD_SENSITIVE)
{
unsigned int newindex = VEC_length (varinfo_t, varmap);
Index: tree-ssa-alias.c
===================================================================
*** tree-ssa-alias.c (revision 130288)
--- tree-ssa-alias.c (working copy)
*************** create_overlap_variables_for (tree var)
*** 3837,3843 ****
TREE_TYPE (var));
/* Make sure to not create SFTs for structs we won't generate variable
infos for. See tree-ssa-structalias.c:create_variable_info_for (). */
! if (VEC_length (fieldoff_s, fieldstack) != 0
&& VEC_length (fieldoff_s, fieldstack) <= MAX_FIELDS_FOR_FIELD_SENSITIVE)
{
subvar_t *subvars;
--- 3837,3843 ----
TREE_TYPE (var));
/* Make sure to not create SFTs for structs we won't generate variable
infos for. See tree-ssa-structalias.c:create_variable_info_for (). */
! if (VEC_length (fieldoff_s, fieldstack) > 1
&& VEC_length (fieldoff_s, fieldstack) <= MAX_FIELDS_FOR_FIELD_SENSITIVE)
{
subvar_t *subvars;
next reply other threads:[~2007-11-20 12:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-20 14:07 Richard Guenther [this message]
2007-11-20 20:12 ` Richard Guenther
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.0711201332130.4148@zhemvz.fhfr.qr \
--to=rguenther@suse.de \
--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).