On Wednesday 12 October 2005 10:23, Daniel Berlin wrote: > The GV heuristic is actually wrong in a lot of cases, in part because we > Wrong? Meaning that it causes us to generate bad code? Or did you mean pessimistic? I can believe the latter.
> LLVM actually does something like this to make their alias analysis > faster. > They come up with global equivalence sets, because they won't be able to > discern the difference between certain globals anyway. > This seems like the natural thing to do in such a situation. > Yes, it is what most naturally maps to the rest of our framework. > Personally, i think there is no good solution in some cases, and we > should just give up, for the testcases in the PR :) > Well, yes, but that's not my focus now. Forget about the PR, I consider it fixed already. It is only a matter of lowering .GV's threshold and making the mechanics not rely on aliasing. > You really can't get any good global var optimization without > whole-program anyway, since they always escape. > Agreed. That's why I want fast heuristics that are not necessarily too dumb. Bah, so we are back to square zero. Oh, well, thanks for the thoughts anyway. Maybe we'll think of something else, but I suspect we don't have many options in this area.