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

What are user threads, What are User threads   User threads are support...

What are User threads   User threads are supported above the kernel and are executed by a thread library at the user level. Thread creation & scheduling are done in the user sp

Write down the basic performance equation, Write down the basic performance...

Write down the basic performance equation? T=N*S/R T=processor time N=no.of instructions S=no of steps R=clock rate

Define minterm and the maxterm - canonical form, Define Minterm and the Max...

Define Minterm and the Maxterm - Canonical Form? Any Boolean expression perhaps expressed in terms of either minterms or maxterms. The literal is a single variable within a t

Explain metadata, What is metadata? Metadata is data that explains anot...

What is metadata? Metadata is data that explains another data. Class definition is metadata. Models are inherently metadata as they explain the things being modeled.

Example of pruning, Example of Pruning: As an example, we are assume t...

Example of Pruning: As an example, we are assume that the four choices for player one, there we are looking only two moves ahead 1 for player one and 1 for player two such as

Compare a decoder and a demultiplexer with block diagram, Compare a decoder...

Compare a decoder and a demultiplexer with suitable block diagrams. Ans. Demultiplexer has similar circuit as decoder but here e is obtained as the particular input line, the

Explain variable-partition contiguous storage allocation, Explain the conce...

Explain the concept of variable-partition contiguous storage allocation. Suppose that we have 1024K main memory available in that 128K is occupied through operating system pro

Explain about server synchronization, Q. Explain about Server synchronizati...

Q. Explain about Server synchronization? Server synchronization: It updates atom by server process of requesting process. In this method an atom acts as a unique update server.

Interpreter, difference between pure and impute inter preter

difference between pure and impute inter preter

What is cable modem, Q What is Cable Modem? One more way of accessing I...

Q What is Cable Modem? One more way of accessing Internet currently being developed is use of cable modems. These require that you subscribe to a cable service as well as allow

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