Elimination of the sub expression

Elimination of the sub expression is functioned in which stage? Describe in brief with proper steps.

E

Expert

Verified

The elimination of sub expression which appears more than once in a statement is a form the machine independent optimization. This is completed in OPTIMIZATION stage, before the matrix is employed as a basis for the code generation, the other machine independent steps can be:

a) Compile time computation with constant operands.

b) Movement of calculation with non-varying operands, out of the loop.

c) The use of Boolean algebra to minimize the expression and calculations.

On the other hand decrease of space required and execution time for the object program is a form of machine dependent optimization. This is usually done while generating the code.

   Related Questions in Computer Engineering

©TutorsGlobe All rights reserved 2022-2023.