The phases of compilation are commonly grouped in which two categories?
Name the 7 conventional phases of a compiler.
First 3 phases (Language dependent)
Middle 2 (Compiler technology dependent)
Last 2 (Machine dependent)

Why use intermediate code generation?
Most code improvement can be done more easily on less hierarchical structure than AST. In other words, ASTs are too hierarchical to hadle code improvement.
How can an intermediate code generator be created?
The typical appoarch is to group nodes into basic blocks and then create a control flow graph.

In intermediate code generation, what is a Basic Block?
Maximal-length set of instructions that should execute sequentially at runtime, with no branches in or out.
In Intermediate code generation, what is a Control flow graph?
This is used to show the relationship among the nodes.

Name two types of transformations that can be done to the control flow graph for machine independent code improvement.
Machine Dependent
What does target code generation do?
Machine Dependent
What are some machine specific code improvements?
Register allocation
Instruction scheduling
Code improvement
What is IF Intermediate responsible for?
In the intermediate stage, what are the responsibilities of trees or DAGs?
In the intermediate form stage, what is stack based?

In the intermediate form stage, what is 3 address instructions?

Elaborate on address space organization.

What does a relocatable object include?

What info can be organized in memory when the program is loaded into memory?
The linker supports separate compilation.
Elaborate on linking.

Describe Static and Dynamic Linkers

What are the two subtasks that linking is involved with?
Picture of Relocatable Objects

On a multi-user system, it is common for several instances of a program to be executing simultaneously. What do operating systems do to keep track of the different instances.

What are the three separate phases of machine independent code improvement?

What is peephole optimization?


Give an example of a redundant load or store that can be eliminated by peephole optimization.
