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 main part of step by step switching system, Explain the main pa...

Explain the main part of configuration of a step by step switching system with the help of a neat diagram . Configuration of a step by step switching system: A step

What is database integration, What is database integration? Database in...

What is database integration? Database integration is the ability to give user-friendly and cost-effective software solutions for data infrastructure management by the interfac

Disadvantages of unauthenticated sites, Disadvantages of unauthenticated si...

Disadvantages of unauthenticated sites All the Units entering the Intranet must be scrutinised to ensure that they are not coming from the unauthenticated sites or users. It a

Need of cisc cpu - computer architecture, Need of CISC CPU -  computer arc...

Need of CISC CPU -  computer architecture: Why is Intel spending money and time to manufacture the Pentium II and the Pentium III? The answer of this question is simple, ba

Why stored program control gains superiority over hard wired, In what way i...

In what way is stored program control superior to hard wired control? The SPC gains superiority over hard wired because of following points: SP C Ha

Find traffic offered and lost, Discuss grade of service. During busy hour, ...

Discuss grade of service. During busy hour, 1500 calls were offered to a group of trunks and 8 calls were lost. The average call duration was 120 seconds. Calculate the traffic off

Find the responses when a computer broadcast an arp reqqest, How many respo...

How many responses does a computer expect to receive when it broadcast an ARP request? Why? An ARP (Address Resolution Protocol) request message is put in a hardware frame and

Serialized when you perform serialization, What exactly is being serialized...

What exactly is being serialized when you perform serialization? Serialization is the process of changing an object into stream of bytes. We perform it at the time of transpor

Bit pair recoding and 2’s complement, Explain bit pair recoding with an exa...

Explain bit pair recoding with an example? Ans: Bit pair recoding halves the maximum number of summands. Group the Booth-recoded multiplier bits in pairs and see the following

How to set cell properties in dreamweaver, Q. How to Set Cell Properties in...

Q. How to Set Cell Properties in dreamweaver? Cell height determines the height of space within a cell row. Notice the space around Compass logo. You want to remove the extra s

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