* [PATCH] Fix PR34148 a bit
@ 2007-11-20 14:07 Richard Guenther
2007-11-20 20:12 ` Richard Guenther
0 siblings, 1 reply; 2+ messages in thread
From: Richard Guenther @ 2007-11-20 14:07 UTC (permalink / raw)
To: gcc-patches
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;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Fix PR34148 a bit
2007-11-20 14:07 [PATCH] Fix PR34148 a bit Richard Guenther
@ 2007-11-20 20:12 ` Richard Guenther
0 siblings, 0 replies; 2+ messages in thread
From: Richard Guenther @ 2007-11-20 20:12 UTC (permalink / raw)
To: gcc-patches
On Tue, 20 Nov 2007, Richard Guenther wrote:
> Another possible optimization I'll post/test seperately is to only
> treat SFT_UNPARTITIONABLE_P as non-partitionable if they are (still)
> addressable.
This doesn't have any effect.
Richard.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-11-20 16:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-20 14:07 [PATCH] Fix PR34148 a bit Richard Guenther
2007-11-20 20:12 ` Richard Guenther
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).