http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57218
--- Comment #2 from Jan Hubicka <hubicka at gcc dot gnu.org> --- Yep, it is just heuristic here. We may get more cureful at -Os (i.e. not so optimistic about the optimization oppurtunities), but last time I played with this it actually resulted in code size increase at Mozilla and -Os. LLVM is doing kind of oposite heuristic tracking when function gets address of local variable as a parameter and anticipate SRA then. I suppose I can give this a try even though it will miss all the optimization of dynamically allocated objects...