12.2 Architecture of miniC Compiler

The overall working of miniC compiler is shown in Fig. 12.1.

 

Processing in miniC compiler. The miniC compiler provides front-end processing including semantic analysis. It outputs three types of files: (i) non-optimized assembly output, (ii) 4-tuple list output *.MAT and (iii) RPN output *.AST. The latter two allow optimization steps in the codegen which uses respective code pattern mapping files codebase. The assembly outputs are processed by system assembler as and linker

 

Fig. 12.1 Processing in miniC compiler. The miniC compiler provides front-end processing including semantic analysis. It outputs three types of files: (i) non-optimized assembly output, (ii) 4-tuple list output *.MAT and (iii) RPN output *.AST. The latter two allow optimization steps in the codegen which uses respective code pattern mapping files codebase. The assembly outputs are processed by system assembler as and linker ld

 

Further details of miniC front-end are shown in Fig. 12.2.

 

 

Fig. 12.2 Front-end of miniC compiler. The codegen.c ...

Get Compilers: Principles and Practice now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.