> In general it will be tricky for latter passes to clean up the messes. > The fundamental problem is that the address computation is exposed to > PRE prematurely (for a given target ) at GIMPLE level.
Yeah, i'm not sure PRE can really do anything different here. I also think you would have a very hard time trying to stop everything from moving invariant computations around at the tree level. Might make more sense to finish the tree level with a global code motion pass that is target sensitive or something.