Control Flow Graph CFG - Complete Lecture | Basic Blocks & Leaders | Loops in CFG | Compiler Design
Автор: GO Classes for GATE CS
Загружено: 2024-01-26
Просмотров: 6047
Описание:
Code Generation & Code Optimization Complete Playlist: • Compiler Design : Intermediate Code & Code...
Basic Blocks: A basic block is a sequence of IR instructions where:
● There is exactly one spot where control enters the sequence, which must be at the start of the sequence.
● There is exactly one spot where control leaves the sequence, which must be at the end of the sequence.
Informally, Basic Block is a sequence of instructions that always execute as a group.
Basic block: single entry, single exit
Control-Flow Graphs: A control-flow graph (CFG) is a graph of the
basic blocks in a function.
Each edge from one basic block to another indicates that control can flow from the end of the first block to the start of the second block.
● There is a dedicated node for the start and end of a function.
GATE CSE 2015 Set 2 | Question: 29: https://gateoverflow.in/8139/gate-cse...
Consider the intermediate code given below.
(1) i=1
(2) j=1
(3) t1 = 5 * i
(4) t2 = t1 + j
(5) t3 = 4 * t2
(6) t4 = t3
(7) a[t4] = -1
(8) j = j + 1
(9) if j = 5 goto (3)
(10) i = i +1
(11) if i 5 goto (2)
The number of nodes and edges in control-flow-graph constructed for the above code, respectively, are
Join GATE CSE 2024 TestSeries by GATEOverflow & GoClasses: https://gateoverflow.in/blog/14987/ga...
Join GO Classes Telegram Group: https://t.me/GATECSE_Goclasses
Enroll GO Classes GATE CSE Complete Course: https://www.goclasses.in/courses/GATE...
GATE DA Complete Course: https://www.goclasses.in/courses/GATE...
GO Classes Mail ID :
[email protected]
[email protected]
#gatecse #gate2024 #goclasses #computerscience #computer_science
Повторяем попытку...
Доступные форматы для скачивания:
Скачать видео
-
Информация по загрузке: