Explain dead code elimination, Computer Engineering

Assignment Help:

Explain briefly Dead code Elimination of the commonly used code optimization techniques

Dead code Elimination:

Code which is unreachable or which does not influence the program (for example dead stores) can be removed. In the illustration below, the value assigned to i is never utilized, and the dead store can be removed. The first assignment to global is dead, and the third assignment to global is not reachable; both can be removed.

int global; void f (){ int i;

i = 1;          /* dead store */

global = 1;     /* dead store */

global = 2;

return;

global = 3;     /* unreachable */}

Below is the code fragment after dead code elimination.

int global;

void f (){ global = 2; return;}


Related Discussions:- Explain dead code elimination

Local variables and global variables in lingo programming, Question: (a...

Question: (a) Differentiate between local variables and global variables in Lingo programming. (b) Using examples differentiate between deleteProp() and deleteAt() function

Inspirations of artificial intelligence, Inspirations of artificial intelli...

Inspirations of artificial intelligence: Artificial Intelligence research can be easily understood by following example in terms of how the following question has been answere

Explain control word, What is control word? A control word is a word wh...

What is control word? A control word is a word whose individual bits show the various control signals.

Explain the working of any one of centralized spc, Explain the working of a...

Explain the working of any one of centralized SPC? Standby mode of operation is the easiest of dual processor configuration operations. Usually, one processor is active and

Describe about analysis, Analysis describes about the logical and statistic...

Analysis describes about the logical and statistical analysis needed for an efficient output. This involves writing of code and performing calculations, but most part of these lang

Which layer is not present in TCP/IP model, Which Layer is not present in T...

Which Layer is not present in TCP/IP model? Presentation layer is not present into Transfer Control Protocol/IP Model.

Demonstration of sorting problem, Q. Demonstration of sorting problem? ...

Q. Demonstration of sorting problem? The term sorting implies organising elements of a provided set of elements in a specific order i.e. descending order / ascending order / al

Binary floating-point number range, Q. Binary floating-point number range? ...

Q. Binary floating-point number range? Smallest Negative number   Maximum mantissa and maximum exponent     =    - (1 -2 -24 ) × 2 127   Largest negative number

Intelligent retrieval from database, Intelligent Retrieval from Database: D...

Intelligent Retrieval from Database: Database system are large bodies of facts about some subjects, which are used to answer users queries about that subject. The design of d

C-programing, c-program for the minimum total number of shelves

c-program for the minimum total number of shelves

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd