code optimization Final Exam Questions And Guaranteed A+ Success/2024.
machine-independent code-optimization phase - correct answer attempts to improve the intermediate code so that better target code will result. code optimization - correct answer The process of tuning the output of a compiler to minimize or maximize some attributes of an executable computer program. Peephole optimization Local optimizations Loop optimization - correct answer Classification of Optimization techniques Optimization - correct answer can be done in almost all phases of compilation. Common-subexpression elimination, copy propagation, dead-code elimination, and constant folding - correct answer number of ways in which a compiler can improve a program without changing the function it computes. Available Expression Analysis Eliminating CSEs - correct answer Global Common Subexpression Elimination Available expressions - correct answer across basic blocks Provide the set of available expressions at each block header Value Numbering - correct answer within a basic block Initialize value table with available expressions Copy Propagation - correct answer is the process of replacing the occurrences of targets of direct assignments with their values. reaching definitions, use-def chains and def-use chains - correct answer Copy propagation often makes use ___, ____ and ___ of when computing which occurrences of the target may be safely replaced. Copy propagation - correct answer is a useful "clean up" optimization frequently used after other optimizations have already been run. Dead Code Elimination - correct answer is to remove code which does not affect the program results code motion - correct answer One important alteration that decreases the amount of code in a loop is induction variable - correct answer A variable x is said to be an ______ if there is a positive or negative constant c such that each time x is assigned, its value increases by c. strength reduction. - correct answer The transformation of replacing an expensive operation, such as multiplication, by a cheaper one, such as addition, is known as _____ Peephole optimization - correct answer An optimization that works by eliminating redundant instructions from a small area of code. local optimization - correct answer reduces the amount of analysis that needs to be performed it saves time and reducestorage requirements loop optimization - correct answer can have a significant impact because many programs spend a large percentage of their time inside loops.
Document information
- Uploaded on
- May 8, 2024
- Number of pages
- 2
- Written in
- 2023/2024
- Type
- Exam (elaborations)
- Contains
- Questions & answers