This is a general treatment of code generation and optimization. It does not attempt to provide definitive solutions, but rather indicates the scope of the problem and the general approaches currently in favor. An extensive bibliography is included. I would recommend this paper to anyone unfamiliar with the area as a means of clarifying the issues and placing them in perspective.