On 3/6/20 7:55 AM, Taylor Simpson wrote: > Does the TCG optimizer assume all global variables are unique?
Yes. > If so, is there a method to indicate that two global variables alias? No. This is why combined fpu+vector register sets, such as ARM NEON, are modeled as a block of memory within CPUARMState against which we issue explicit loads and stores. It has been a long-term goal to improve the TCG optimizer to be able to do register allocation across these memory operations, at which point "global variables" would be lowered to loads and stores, at which point the kind of aliasing you're talking about would work. However, it's been 2 years since this goal came up, and I've not really gotten around to doing anything about it. It's not high priority because x86 does such a good job of store-forwarding that it would be difficult to make up for the extra computation required. :-P r~