> Reload is a mess but in local context it is doing a good job.
That's exactly the point: it makes sense and does the right thing when viewed locally, but there's little feedback and/or linkage between reload and the other optimizers regarding global decisions. So those global decisions are often made without being too conscious of such things as register pressure and reload has to make decisions without being that aware of what it might be undoing that was previously done. Improving this is a very hard problem that many people have worked on for years without much success. One could even argue that moving optimizations to higher level constructions (e.g., from RTL to tree) worsens the problem because you have even less low-level knowlege then.