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

Decision trees - artificial intelligence, Decision Trees - Artificial intel...

Decision Trees - Artificial intelligence: Suppose you just ever do four things at the weekend: go shopping, watch a film, play tennis or just stay inside.  What you do depends

What is assembly condition codes, Condition codes are the list of possible ...

Condition codes are the list of possible conditions that can be tested through conditional instructions. Typical conditional instructions have: conditional branches, conditional ju

What is one-way association, What is one-way association? One-way assoc...

What is one-way association? One-way association means association will traverse in only in one direction and implement using the actual implementation. If the multiplicity is

Cn, What is the basic requirement for establishing VLANs?

What is the basic requirement for establishing VLANs?

Device drivers in assembly, Device drivers are special programs installed b...

Device drivers are special programs installed by config.sys file to control installable devices.  So personal computers can be expanded at some future time by installation of new d

Name various work processes of r/3 system, Name various work processes of R...

Name various work processes of R/3 system? A) Dialog or Online (processes only one request at a time). B) Background (Started at a specific time) C) Update (primary or se

How many types of stages include in process of data mining, How many types ...

How many types of stages include in process of data mining? The process of data mining comprised three stages as given below: a) The initial exploration b) Model buildin

Rational schema, write the rational schema and draw it’s dependency diagram...

write the rational schema and draw it’s dependency diagram. Identify all dependencies.

Explain characteristics of latch and flip-flop, Explain characteristics of ...

Explain characteristics of Latch and Flip-Flop. Latches are level-sensitive and transparent While the clock is high it passes input value to Output While the clock is l

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

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