Compilation - Part Four: Intermediate Code

preview_player
Показать описание
This is part four of a series of videos about compilation. Part four is about an intermediate representation of source programs that some compilers generate known as intermediate code. The video focuses on a form of intermediate code known as Three Address Code (TAC). You will see the general structure of three address code instructions, and how sequences of three address code instructions can be used to fix the order of operations in complex arithmetic expressions. You will also see how high level programming constructs that govern the flow of control in a program, such as If statements and While loops, can be replaced with conditional and unconditional jump instructions. The issue of generating forward jump instructions to labels that are as yet unknown, using a technique known as backpatching, is also mentioned. The way a compiler might make use of basic blocks and flow graphs to represent the source program is also covered, including the various ways in which basic blocks can be optimised, for example, to remove duplicate sub-expressions or dead code, copy propagation and constant folding. As you will see when you watch this series, compilation involves a diverse range of themes in the field of computer science including high and low level programming paradigms, the definition of context free grammars, the application of dynamic data structures such as stacks, linked lists, hash tables, graphs and trees, memory management, processor architectures, and more. This series will give you an insight into some of the concepts and features that are typical of many compilers.
Рекомендации по теме
Комментарии
Автор

Thank you so much for your hard work and content. It's amazing! I greatly appreciate it

hanimoe
Автор

4:38 I believe it should be:
If x < 10 goto L3
goto L1 (rather than goto L2)

Anonymous__Not_Found
Автор

9:08 I don't get here how the order of instructions in a particular block might be changed without causing any trouble .. 🤔?

samarthtandale
Автор

Thank you very much. It helped me a lot.

rezarasouli
Автор

Hi thanks for this video. Can you share any link or resource from where I can learn how to write intermediate code for the given source code like java code?

bloom
Автор

Where can I learn how to make an intermediate code?

narinehmay