Concepts
My notes on CS 6120: Advanced Compilers: The Self-Guided Online Course
CFG (conntrol flow graph)
(learned at https://vod.video.cornell.edu/media/1_vnx6laq9, explanations: https://github.com/era/cs6120/blob/2022sp/content/lesson/2.md)
- What is a control flow graph in compiler design?
Flow graph is a directed graph. It contains the flow of control information for the set of basic block. A control flow graph is used to depict that how the program control is being parsed among the blocks. https://findanyanswer.com/what-is-a-flow-graph-in-compiler-design
Local, global and inter-procedural optimizations
Local (Inside a basic block of a CFG)
- Dead Code optimizations (e.g. assigning a value to a variable that is never used, because we reasign before using it)
Global (inside a function, with more than one basic block inside it)
- Dead Code Optmizations (e.g. variables never usedd)