18C5T13 Lecture Notes - Lecture 4: Common Subexpression Elimination, Instruction Set, Loop Fission And Fusion

9 views10 pages

Document Summary

Code optimization is required to produce an efficient target code. Elimination of unnecessary instructions in object code or the replacement of one sequence of instruction by a faster sequence of instructions that does the same thing is usually called code improvement or code optimization. In code optimization, we need to take care of the semantic equivalence of the source program. The improvement over the program efficiency must be achieved without changing the algorithm of the program. Code becomes inefficient because of two factors: such as, programmer & Code optimization can be performed in different phases of a compiler. In front end: programmer can make use of efficient algorithm. In icg phase: apply transformations on loops, procedure calls and address calculation. In code generation: use registers, select appropriate instructions and apply peephole optimization. Optimization is of two types such as, machine dependent optimization and machine independent optimization.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents