Basic Blocks and Flow Graphs | Code Optimization | Compiler Design

preview_player
Показать описание
#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)
...................................................................................................................
...................................................................................................................
📚 Subject Wise Playlist 📚
Рекомендации по теме
Комментарии
Автор

Excellent teaching. U made complex concepts easier and making learning fun thank you sir

nancynelson
Автор

I went through your whole syllabus and it was wonderful

ashutoshgiri
Автор

Tomorrow my exam and today I watching basic block 😅 confidence level when high 😂

myvlog_
Автор

sir your teaching way is mind blowing plse remaining topic we are following you gate 2022 🙏🙏

sunilpatidar
Автор

Sir agar loop ka ICG positive condition leke kara toh 5 basic block leaders aarahe hai it is correct or something wrong in my ICG

mohd.irfanlohar
Автор

I think " goto 3 " is also leader because it is unconditional target . Then 5 basic blocks are there

B1 -> B2 ->B3 ->B4, B2 -> B5 and B4 -> B2

flexpanda
Автор

Sir why is there no arrow from block 3 to block 4

rishabhkeshan
Автор

Converting hard topics into easy one 👍🫡

navdeepladdha
Автор

Tommorow is my exam and watching the last topic to cover . I have completed all the units hope my exam will be good😢

studywithme
Автор

sir, point 2 bhi leader hoga bcz it come immediately in next to point 1 which is a leader

AdarshSingh-dzbu
visit shbcf.ru