[Bug tree-optimization/30567] [4.2 Regression] -O3 optimizer bug
rguenth at gcc dot gnu dot org
gcc-bugzilla@gcc.gnu.org
Wed Apr 25 15:32:00 GMT 2007
------- Comment #29 from rguenth at gcc dot gnu dot org 2007-04-25 16:32 -------
Oh, btw. why the may_aliases bitmap for SMT.11 is empty on entry to the loops
computing the transitive closure (it tries to, right?) is that SFT.0 is not
considered stored to in the first nested loop over pointers and addressable
vars. Shouldn't we add the vars NMT aliases to ai->written_vars in
compute_flow_sensitive_aliasing? This also seems to fix the problem:
Index: tree-ssa-alias.c
===================================================================
*** tree-ssa-alias.c (revision 124151)
--- tree-ssa-alias.c (working copy)
*************** compute_flow_sensitive_aliasing (struct
*** 1142,1152 ****
one). Note that only pointers that have been dereferenced will
have a name memory tag. */
if (pi->name_mem_tag && pi->pt_vars)
! EXECUTE_IF_SET_IN_BITMAP (pi->pt_vars, 0, j, bi)
! {
! add_may_alias (pi->name_mem_tag, referenced_var (j));
! add_may_alias (v_ann->symbol_mem_tag, referenced_var (j));
! }
}
}
--- 1142,1159 ----
one). Note that only pointers that have been dereferenced will
have a name memory tag. */
if (pi->name_mem_tag && pi->pt_vars)
! {
! bool stored_to = bitmap_bit_p (ai->dereferenced_ptrs_store,
! DECL_UID (SSA_NAME_VAR (ptr)));
! EXECUTE_IF_SET_IN_BITMAP (pi->pt_vars, 0, j, bi)
! {
! add_may_alias (pi->name_mem_tag, referenced_var (j));
! if (stored_to)
! bitmap_set_bit (ai->written_vars,
! DECL_UID (referenced_var (j)));
! add_may_alias (v_ann->symbol_mem_tag, referenced_var (j));
! }
! }
}
}
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30567
More information about the Gcc-bugs
mailing list