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

Data mining, what is data mining and what is its uses in a industry?

what is data mining and what is its uses in a industry?

Differentiate between protection and security, Differentiate between protec...

Differentiate between protection and security. Operating system contains a collection of objects, software or hardware. All objects have a unique name and can be accessed by

Differentiate between sequential and combinational circuits, Problem 1 ...

Problem 1 Prove that :- x(x + y) = x by using identities 2 Write a short note on Analog to Digital Converter (ADC) 3 Differentiate between sequential and combinational ci

Btree, What should the size of ''t'' in btree be depending on the hard disk...

What should the size of ''t'' in btree be depending on the hard disk size

Why do we need registers, Why do we need Registers? If t cpu is cycle...

Why do we need Registers? If t cpu is cycle time of CPU which is the time taken by CPU to execute a well-defined micro-operation employing registers and t mem is memory cycl

What is macro, A series of keystrokes and mouse clicks that can be abbrevia...

A series of keystrokes and mouse clicks that can be abbreviated into a one keystroke or mouse click.

What is a kernel shell, A shell is a program that presents an interface to ...

A shell is a program that presents an interface to several operating system functions and services. The shell is so called because it is an outer layer of interface among the user

Compute minimum value of the horizontal force, Compute minimum value of the...

Compute minimum value of the horizontal force: Block A of weight 520N rest on horizontal top of block B having weight of 700N as shown in the figure given below. Block A

Functions for mpi environment, Q. Functions for MPI Environment? Int M...

Q. Functions for MPI Environment? Int MPI_Finalize (void) It ends the MPI environment. Any MPI function cannot be called after MPI_Finalize. Each MPI process belongs to on

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