Рет қаралды 67,267
#BasicBlocksandFlowGraphs
basic block example || loops in flow graph || global data flow analysis || algorithm to generate basic blocks and flow graph || basic blocks and flow graphs || partition three adress code to basic blocks || flow graphs || leader finding algorithm || compiler design
A Basic Block is a straight line code sequence with no branches except at the entry and end. It is a set of statements that execute one after another. The first task is to partition a sequence of three-address codes into basic blocks. Instructions are added until a jump or label is met, and control moves further consecutively from one instruction to another. The algorithm standardized this idea:
Input: A sequence of three address instructions. Process: Instructions from intermediate code are determined as leaders. The first three-address instruction of the intermediate code is a leader, and instructions that target unconditional or conditional jump/goto statements are leaders. Each leader's basic block contains itself and all instructions up to excluding the next leader.
Contact Details (You can follow me at)
Instagram: / thegatehub
LinkedIn: / thegatehub
Twitter: / thegatehub
...................................................................................................................
Email: thegatehub2020@gmail.com
Website: thegatehub.com/
...................................................................................................................
📚 Subject Wise Playlist 📚
▶️Data Structures: tinyurl.com/bwptf6f7
▶️Theory of Computation: tinyurl.com/5bhtzhtd
▶️Compiler Design: tinyurl.com/2p9wtykf
▶️Design and Analysis of Algorithms: tinyurl.com/ywk8uuzc
▶️Graph Theory: tinyurl.com/3e8mynaw
▶️Discrete Mathematics: tinyurl.com/y82r977y