------- Comment #1 from rguenth at gcc dot gnu dot org 2008-05-28 11:29 ------- The reason that the PRE no longer works is that the edge iterator ei is now call clobbered. It escapes to a pure/const function (which wouldn't make it call clobbered alone) and it has its address taken which is why it is in the list of addressable vars. Now through the other calls there escape pointers that point to anything, so all addressable vars get clobbered.
A few things would help here: - properly track what can point to local variables - track addresses that are stored somewhere separately (in this case &ei is only passed to a pure/const call) - do type-based pruning of the call clobber variables. This works only if an escaped pointer is _always_ dereferenced (thus the dereference site post-dominates the entry BB) - in contrast to pruning the points-to sets for dereference sites where we can prune in flow-insensitive way. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36344