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

Illustrate the list of key differences to word processors, Illustrate the l...

Illustrate the list of key differences to word processors The following is a list of key differences to word processors: -  Most word processors force users to work on a doc

What is script-fu in gimp, Sript-Fu is the first GIMP scripting extension. ...

Sript-Fu is the first GIMP scripting extension. Extensions are split processes that communicate with the GIMP in the similar way that plug-ins do. The distinction is that extension

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

Explain about data segment, DATA SEGMENT  NUM1            DB      15h;...

DATA SEGMENT  NUM1            DB      15h;     First number   NUM2            DB      20h;     Second number  RESULT DB?  ; Put sum here  CARRY DB? ; Put any carry he

Software characteristics, Software Characteristics: Software is en...

Software Characteristics: Software is engineered and developed. Software can't "wear-out". Most of the software continues to be routine built. The term in

Software engineering, what is modular system ? list important properties of...

what is modular system ? list important properties of modular system

Analog to Digital convertor, The A/D converter whose conversion time is ind...

The A/D converter whose conversion time is independent of the number of bits is ? Ans. Parallel conversion is the A/D converter whose conversion time is independent of the Numbe

Determine Boolean identities using Boolean algebra, Prove the following ide...

Prove the following identities   a. A ‾B ‾C‾ + A ‾BC ‾ + AB ‾C ‾ + ABC ‾ = C ‾ b. AB + ABC + A ‾ B + AB ‾C = B + AC Ans. a. LHS = A'B'C' + A'BC' + AB'C' + ABC' =

Types of addressing modes in assembly language, Types of Addressing Modes: ...

Types of Addressing Modes: Each instruction of a computer mentions an operation on certain data. There are many ways of specifying address of the data to be operated on. These

Hiring problem algorithm, Consider the Hire Assistant problem. We interview...

Consider the Hire Assistant problem. We interview n candidates and always hire the best qualified so far. Let n = 5 for our example. Find the probabilities that we hire exactly 1 t

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