Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!haven!adm!cmcl2!lanl!jlg From: jlg@lanl.gov (Jim Giles) Newsgroups: comp.lang.misc Subject: Re: Aggressive optimization Message-ID: <4699@lanl.gov> Date: 1 Nov 90 22:33:35 GMT References: Organization: Los Alamos Natl Lab, Los Alamos, N.M. Lines: 22 From article , by pcg@cs.aber.ac.uk (Piercarlo Grandi): > [...] > In a way or another this implies that each language implies a virtual > machine. The task of the code generator is to map the virtual machine > onto the real machine as well as it can, which means faithfully > (semantics) and efficiently (pragmatics). Unfortunately for your argument, there are few languages which have definitions of this kind. The definition of a language usually implies a _class_ of virtual machines. The code generator is allowed to map any of these onto the real hardware. Any optimizer which generates code which faithfully implements anything within the class of acceptable behaviours is correct. If an optimizer leaves the class of acceptable behaviours, it is _broken_. You are trying to limit the compiler to code transformations that _you_ regard as straightforward. In truth, the compiler is only limited by the language definition. If you don't like some of the optimizations allowed by the language definition, then lobby for the definition to be changed. J. Giles