This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/32723] [4.2 Regression] memory hog in solve_graph
- From: "dberlin at dberlin dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 31 Oct 2007 14:22:23 -0000
- Subject: [Bug tree-optimization/32723] [4.2 Regression] memory hog in solve_graph
- References: <bug-32723-14802@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #16 from dberlin at gcc dot gnu dot org 2007-10-31 14:22 -------
Subject: Re: [4.2 Regression] memory hog in solve_graph
On 31 Oct 2007 13:07:57 -0000, rguenth at gcc dot gnu dot org
<gcc-bugzilla@gcc.gnu.org> wrote:
>
>
> ------- Comment #15 from rguenth at gcc dot gnu dot org 2007-10-31 13:07 -------
> The memory is temporarily needed now by solve_graph(), because the graph has
> 48902 nodes.
48902 nodes is not a lot for the solver, to be honest.
> On the mainline we have only 3 constraints while for 4.2 we have
> thousands:
>
> ANYTHING = &ANYTHING
> READONLY = &ANYTHING
> INTEGER = &ANYTHING
> ESCAPED_VARS = *ESCAPED_VARS
> NONLOCAL.6 = ESCAPED_VARS
> ESCAPED_VARS = &NONLOCAL.6
> ESCAPED_VARS = &NONLOCAL.6
> infos = ESCAPED_VARS
> c_20089 = ESCAPED_VARS
> ESCAPED_VARS = &c_20089
> c_20089 = &ANYTHING
> c_20089 = &ANYTHING
> ESCAPED_VARS = &c_20089.val
> c_20089.val = ESCAPED_VARS
> infos = &c_20089
> infos = &c_20089.val
> c_200A2 = ESCAPED_VARS
> ESCAPED_VARS = &c_200A2
> ...
>
> the mainline looks like:
>
> ANYTHING = { ANYTHING }
> READONLY = { ANYTHING }
> INTEGER = { ANYTHING }
> D.28988 = same as infos
> D.28988.c = same as infos
> D.28988.b = same as infos
> infos = { ANYTHING }
This is because we compute call clobbering differently for mainline now.
The thing you'd want to add to 4.2 would be location equivalence
optimization, which i never finished for either 4.2 or 4.3 (4.3 has
code to compute it, but we don't substitute the variables).
Location equivalence would turn the escaped_vars set into 1 variable
during propagation, and then expand it back out at the end.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32723