From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 110292,45b50f14dadfce5b X-Google-Attributes: gid110292,public X-Google-Thread: 1164f8,45b50f14dadfce5b X-Google-Attributes: gid1164f8,public X-Google-Thread: 102b75,45b50f14dadfce5b X-Google-Attributes: gid102b75,public From: Wilco Dijkstra Subject: Re: Final kick at the "Merced Guessing Game" Date: 1997/10/02 Message-ID: <3433AAC0.10C4@NOSPAMarm.com>#1/1 X-Deja-AN: 277303268 References: <3431A2DB.4273@EasyInternet.net> <60ui2q$33a$1@cdn-news.telecom.com.au> <60ujk7$i58$1@lyra.csx.cam.ac.uk> <3432F896.7FD2@HousemarqueREM.fi> Organization: Advanced RISC Machines Ltd Reply-To: Wilco.Dijkstra@NOSPAMarm.com Newsgroups: comp.sys.intel,comp.arch,comp.sys.dec Joseph H Allen wrote: > I'm still waiting for someone to try a hardware fix for the aliasing > problem. One way is to make the internal registers more like a cache than > they are now. Then when you load a word into a register, you also load the > memory address where the word came from into some auxiliary part of the > register. The register snoops the bus at this point: if a subroutine > modifies the memory at that address, a bit in the register is set. If the > caller then accesses that register you get a trap or delay and a reload > occurs. Using this, you can have your compiler safely assume that there are > no aliases, and avoid doing tons of reloads after every subroutine call. I don't think it's a good idea to try to create expensive hardware solutions to the aliasing problem - it's software that created it in the first place! You just need to find the cases where aliasing is appropriate and ban all other uses. This is similar to gotos. It's my belief that almost all aliasing is avoidable at low cost during compilation. For example most aliasing is due to function calls. With global aliasing analysis the complete set of aliases can be calculated. Of course a good language which avoids most of the aliasing problems (eg. the ADA parameter passing mechanism) would help!