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

Padovan string, how to write this program,what are the declaration and func...

how to write this program,what are the declaration and function are needed in java program in java // aakash , suraj , prem sasi kumar kamaraj college program 1 : pack

Wrapping database calls into mts transactions, What is the advantage of wra...

What is the advantage of wrapping database calls into MTS transactions? Ans) If database calls are made within the context of a transaction, aborting the transaction will undo a

Can you tell me some of system tasks and their purpose, Can you tell me som...

Can you tell me some of system tasks and their purpose? $display, $displayb, $displayh, $displayo, $write, $writeb, $writeh, $writeo. The most useful of these is $display. T

Define the half duplex transmission, Define the Half Duplex Transmission ...

Define the Half Duplex Transmission A half-duplex channel can receive andsend, but not at the same time. It's like a one-lane bridge where two-way traffic should give way in

What is framework, What is framework? Framework is a skeletal structure...

What is framework? Framework is a skeletal structure of a program that must be elaborated to build a complete application. It has abstract classes.

Push and pop, i want flowchart for push, pop in stack element and display s...

i want flowchart for push, pop in stack element and display stack and exit

Information technology or information system, Information Technology or Inf...

Information Technology or Information System Before going further we need to clarify what we mean by the term information system. It is easy to confuse terminology as many tex

Quick sort , Write Quick sort non recursive program

Write Quick sort non recursive program

Illustration of an instruction cycle, Q. Illustration of an instruction cyc...

Q. Illustration of an instruction cycle? Instruction cycle displayed in given figure comprises subsequent stages: First address of the subsequent instruction is calculat

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