On Thu, Apr 18, 2002 at 03:24:58PM +1000, Andrew J Bromage wrote: > - Nobody is likely to use it any time soon.
People say that about my brain, but they haven't tried to take it from me yet :) Having registers provide the destination for some branches makes it possible to generate code that eliminates most of the comparisions needed to implement C style case/switch statements, so this is not a useless feature. > - It is in general impossible for an optimizer to determine > where the branch targets are if you allow registers as > branch targets. Even when it's possible, it's too hard. That's why a compiler would put information about possible targets of branches somewhere available to the optimizer. > - Eliminating it speeds up life.pasm by about 5-10% according > to my highly unscientific benchmark. What about mops.pasm ? The speedup (if real) is probably just a side-effect of deleting the code for those ops. -- Jason