Chapter 7: Intermediate representation and symbol table

Issues in new IR Design

. how much machine dependent

. expressiveness: how many languages are covered

. appropriateness for code optimization

. appropriateness for code generation

. Use more than one IR (like in PA-RISC)

The issues in an IR design are:

1. Machine dependence: for machine level optimizations.

2. Expressiveness: for ease of understanding and extensibility.

3. Appropriateness for code optimization.

4. Appropriateness for code generation.

5. Whether it will use existing design or not? This is an important issue as if optimum; it should use pre-existing design so that it doesn't have issues of portability with previously existing architectures, and other issues.

6. Use of more than one IR for more optimization: Different IRs have different levels of optimizations possible.

7. Suitable for dependence analysis by representing subscripts by list of subscripts.

8. Make addresses explicit in linearized form. This is suitable for constant folding, strength reduction, loop invariant code motion and other basic optimizations.