[Bug tree-optimization/13962] [tree-ssa] make "fold" use alias information to optimize pointer comparisons

rguenth at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Aug 15 08:39:00 GMT 2014


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=13962

--- Comment #9 from Richard Biener <rguenth at gcc dot gnu.org> ---
Created attachment 33336
  --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=33336&action=edit
patch

Like this - does it help the particular case?

Note that one issue is that points-to doesn't track NULL-ness reliably
(like may-point to zero if it may point to a weak decl), and we drop
maybe-NULL-ness because we don't use it.  Likewise we don't keep track
of pointers to CONST_DECLs or LABEL_DECLs or FUNCTION_DECLs (we simply
drop them on the floor rather than treating them as "anything").

The patch doesn't bootstrap which means it probably reveals bugs in
points-to.  This is what I meant with "dangerous" ;)



More information about the Gcc-bugs mailing list