RG02@CMU-CS-A.ARPA (05/31/85)
From: Richard H. Gumpertz <Rick.Gumpertz@CMU-CS-A.ARPA> A belated example of something a Bliss-11 compiler did that no assembler programmer should ever do: SOURCE: X = X + 6 In this case, X was a local variable on the stack. Furthermore, it happened to be at offset 6 from the stack pointer, SP. An assembler programmer would probably write something like: ADD #6,X(SP) Bliss, however, noticed that the two literals were equal and generated ADD @PC,6(SP) Any assembly programmer that wrote that would probably deserve to be hung by his toenails except under very unusual circumstances. The key thing is that a compiler can make optimization decisions that might have to be reversed at a later time due to a change elsewhere in the program (such as moving X). Because it remakes those decisions on each compilation, it will not get into trouble as an assembler programmer might for making that optimization. Rick Gumpertz