This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/15559] [3.3/3.4/3.5 Regression] SSAPRE misses obvious redundant expression
- From: "dberlin at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 10 Jun 2004 16:46:17 -0000
- Subject: [Bug tree-optimization/15559] [3.3/3.4/3.5 Regression] SSAPRE misses obvious redundant expression
- References: <20040521043035.15559.pinskia@gcc.gnu.org>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From dberlin at gcc dot gnu dot org 2004-06-10 16:45 -------
Theoretically yes, but no PRE algorithm will do what you suggest, you need a generic code hoisting
algorithm. The transformation you suggest violates the optimality conditions of PRE, even if it can later
make better code, so it wouldn't be performed.
In short, PRE is for partial redundancies, not a cost based generic code hoister, so this is not a case of
PRE missing obvious redundant expressions. There is no redundant expression (it occurs once along
each path) here that it could eliminate, there is simply an expression that could be hoisted one block
up.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15559