GATE | GATE-CS-2014-(Set-1) | Question 65

17 Sep, 2021
Which one of the following is FALSE?(A) A basic block is a sequence of instructions where control enters the sequence at the beginning and exits at the end.(B) Available expression analysis can be used for common subexpression elimination.(C) Live variable analysis can be used for dead code elimination.(D) x = 4 ∗ 5 => x = 20 is an example of common subexpression elimination.Answer: (D)Explanation: (A) A basic block is a sequence of instructions where control enters the sequence at the beginning and exits at the end is TRUE.
(B) Available expression analysis can be used for common subexpression elimination is TRUE. Available expressions is an analysis algorithm that determines for each point in the program the set of expressions that need not be recomputed. Available expression analysis is used to do global common subexpression elimination (CSE). If an expression is available at a point, there is no need to re-evaluate it.
(C)Live variable analysis can be used for dead code elimination is TRUE.
(D) x = 4 ∗ 5 => x = 20 is an example of common subexpression elimination is FALSE.Common subexpression elimination (CSE) refers to compiler optimization replaces identical expressions (i.e., they all evaluate to the same value) with a single variable holding the computed value when it is worthwhile to do so.
Below is an example
In the following code:

a = b * c + g;
d = b * c * e;

it may be worth transforming the code to:

tmp = b * c;
a = tmp + g;
d = tmp * e;
Sources:https://en.wikipedia.org/wiki/Common_subexpression_eliminationhttps://en.wikipedia.org/wiki/Available_expression
GATE PYQ - Code Generation and Optimization (Continued...) | Joyojyoti Acharya |GeeksforGeeks GATE | - YouTubeGeeksforGeeks GATE Computer Science17.4K subscribersGATE PYQ - Code Generation and Optimization (Continued...) | Joyojyoti Acharya |GeeksforGeeks GATE |Watch laterShareCopy linkInfoShoppingTap to unmuteIf playback doesn't begin shortly, try restarting your device.You're signed outVideos you watch may be added to the TV's watch history and influence TV recommendations. To avoid this, cancel and sign in to YouTube on your computer.CancelConfirmMore videosMore videosSwitch cameraShareInclude playlistAn error occurred while retrieving sharing information. Please try again later.Watch on0:000:007:31 / 38:16•Live•<div class="player-unavailable"><h1 class="message">An error occurred.</h1><div class="submessage"><a href="https://www.youtube.com/watch?v=mNG-F-8t3a4" target="_blank">Try watching this video on www.youtube.com</a>, or enable JavaScript if it is disabled in your browser.</div></div>Quiz of this Question
GATE-CS-2014-(Set-1)
GATE-GATE-CS-2014-(Set-1)
GATE
Writing code in comment?
Please use ide.geeksforgeeks.org,
generate link and share the link here.
GATE | GATE-CS-2014-(Set-2) | Question 65
GATE | Sudo GATE 2020 Mock I (27 December 2019) | Question 33
GATE | GATE-CS-2015 (Set 3) | Question 65
GATE | Gate IT 2005 | Question 52
GATE | GATE CS 1996 | Question 63
GATE | GATE-CS-2014-(Set-3) | Question 65
GATE | GATE CS 1997 | Question 50
GATE | GATE-CS-2015 (Set 2) | Question 65
GATE | GATE-CS-2001 | Question 50
GATE | GATE CS 2013 | Question 43