An analysis of pascal programs and several basic block optimizations
Lynn Robert Carter · 1980
Since higher level languages have become a standard tool of software engineers, a need has developed for compilers which can be developed quickly and produce good code. The implementation of compilers require many design decisions, a large number of which depend on the kinds of programs being compiled. This is especially true, in general, of code generation, and particularly in the area of optimization. An analysis of programs to be compiled allows the compiler writer to make better decisions. This dissertation examines 89 Pascal programs and characterizes many of the static properties of these programs. Additionally, an analysis of several basic block optimizations is performed. The results show: first, nearly all common subexpressions deal with addressing; second, subscripts tend to be very simple; and lastly, that the use of increment and decrement instructions will replace a significant number of additions, subtractions, and stores.