This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug optimization/14287] [tree-ssa] does not remove unnecessary extensions
- From: "pinskia at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 17 Mar 2004 01:46:44 -0000
- Subject: [Bug optimization/14287] [tree-ssa] does not remove unnecessary extensions
- References: <20040225041155.14287.kazu@cs.umass.edu>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-03-17 01:46 -------
Actually it is not that involved at all.
Basically here is how my pass works:
For each block:
For each statement in the block:
is the statement is a modify expression and the RHS is a cast then:
is the cast's operand's definition a modifiy express and its RHS a cast also:
Do the inner and outer types match and is the intermediate's type size is larger or
equal to the outer's type then remove change the statement to point to the outer variable.
Let DCE do its work with respect to getting rid of the intermediate variable.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=14287