This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Some invariant ADDR_EXPR fixes


This is the first of what I expect will be several patches to fix
places where we twiddle an ADDR_EXPR, but do not update its various
flags.


In DOM we only called recompute_tree_invariant_for_addr_expr if we might
have exposed new symbols -- that's wrong.  Consider something like

&a[n]

Where DOM determines that N is a constant.  That won't expose new
symbols, but it does require that we call
recompute_tree_invariant_for_addr_expr.  We need to do basically the
same thing in tree-ssa-propagate.c when it performs constant
propagations into ADDR_EXPR objects.


In tree-ssa-forwprop, anytime we forward propagate an ADDR_EXPR and the
ADDR_EXPR isn't optimized away we need to call
recompute_tree_invariant_for_addr_expr.

Bootstrapped and regression tested on i686-pc-linux-gnu.


Attachment: PPP
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]