[Bug tree-optimization/9059] unused arrays not optimized away
steven at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Mon May 17 21:09:00 GMT 2004
------- Additional Comments From steven at gcc dot gnu dot org 2004-05-17 10:47 -------
Ehm, pass_remove_useless_vars _is_ called, but there is no variable annotation
for unused variables, so:
/* Remove all unused, unaliased temporaries. Also remove unused, unaliased
local variables during highly optimizing compilations. */
ann = var_ann (var);
if (ann
&& ! ann->may_aliases
&& ! ann->used
&& ! ann->has_hidden_use
&& ! TREE_ADDRESSABLE (var)
we already have (!ann). Something like this should work:
+ if (!ann)
+ return false;
! else if (! ann->may_aliases
(etc.)
I'll make a patch and try if that works.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=9059
More information about the Gcc-bugs
mailing list