This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/13799] [tree-ssa] consecutive stores to static vars not removed
- From: "law at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 16 Feb 2004 22:05:32 -0000
- Subject: [Bug optimization/13799] [tree-ssa] consecutive stores to static vars not removed
- References: <20040121203221.13799.dann@godzilla.ics.uci.edu>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From law at gcc dot gnu dot org 2004-02-16 22:05 -------
Totally eliminating local1 is for real world code a waste of time -- what would be
the point in having the static variable if it was always set before it was used.
While it would be possible to detect that local1 is 100% totally useless, it's
simply not work the programming effort or compile-time cost.
Now it certainly is worth the cost to eliminate the clearly dead "local1 = 0"
statement as well as the "local2 += c" statement, which is precisely what the
DSE code I checked in earlier today does.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13799