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

Explain the matlab working environment, This is the set of tools and facili...

This is the set of tools and facilities that you work with as the MATLAB user or programmer. It contains facilities for managing the variables in your workspace and importing and e

Static or dynamic - artificial intelligence, Static or Dynamic - artificial...

Static or Dynamic - artificial intelligence An environment is static if it doesn't change while an agent's program is making the decision about how to act. When programming ag

Show the responsibilities of session layer, Q. Show the Responsibilities of...

Q. Show the Responsibilities of session layer? Session layer: Main functions of this layer are to establish, synchronize and maintain the interaction between two communicatio

Designing e-cash based system, How can it be achieved in designing e-cash b...

How can it be achieved in designing e-cash based system? E-cash is essentially an online solution.  The buyer must validate the coins by the issuer in order to get the purchase

What is assembly language, What is assembly language? Assembly languag...

What is assembly language? Assembly language : It is a family of low-level language for microprocessors, programming computers, microcontrollers etc. All are implement a symbo

What is a formal description for a programming language, A grammar for a pr...

A grammar for a programming language is a formal description of ? Structure is a formal description for a programming language.

How can common bus system be constructed, How can common bus system be cons...

How can common bus system be constructed A common bus system could be constructed using multiplexers. These multiplexers select source register whose binary information is then

Explain in detail about first generation electronic computer, First Generat...

First Generation Electronic Computers (1937-1953) Three machines have been promoted at different times as first electronic computers. These machines used electronic switches

Build and fix model, Why Build and fix model is considered as ad-hoc softwa...

Why Build and fix model is considered as ad-hoc software development model?

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