This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/27809] inefficient gimplification of globals
- From: "dann at godzilla dot ics dot uci dot edu" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 13 Jun 2006 14:22:05 -0000
- Subject: [Bug tree-optimization/27809] inefficient gimplification of globals
- References: <bug-27809-1008@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #3 from dann at godzilla dot ics dot uci dot edu 2006-06-13 14:22 -------
(In reply to comment #2)
> (In reply to comment #1)
> > Hmm, it should have produced G.3, G.n, at least I would have thought.
> >
>
> No, we intentionally use the same variable for the lexically identical
> expressions, see internal_get_tmp_var/lookup_tmp_var. Original intention was
> to make PRE and other redundancy elimination optimization passes more efficient
> (this was essential especially for the old SSAPRE pass that used lexical
> equality of expressions to check for redundancies). These reasons are no
> longer relevant, but keeping the code saves a significant amount of memory and
> compile time (I tried removing the code a few months ago, but since it slows
> down compilation by some 1-2%, I never bothered with posting the patch).
Using the same variable is surely good, wouldn't it be even better to not
create the redundant "G.2 = G" assignments in this PR?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27809