Explore tens of thousands of sets crafted by our community.
Compiler Optimization Techniques
20
Flashcards
0/20
Loop Fusion
Loop fusion combines adjacent loops that iterate over the same range into a single loop, reducing loop overhead and improving cache performance.
Common Subexpression Elimination
Common subexpression elimination identifies and reuses previously computed expressions to avoid redundant calculations, saving time and resources.
Constant Propagation
Constant propagation substitutes the values of known constants in expressions, simplifying the program and potentially enabling other optimizations.
Partial Redundancy Elimination
Partial redundancy elimination removes expressions that are redundant on some but not all paths through a program, optimizing without losing program correctness.
Function Inlining
Function inlining substitutes a function call with the actual body of the function, reducing function call overhead but potentially increasing code size.
Peephole Optimization
Peephole optimization performs local optimizations on a small part of the program, such as replacing inefficient sequences of instructions.
Tail Call Optimization
Tail call optimization replaces certain function calls with a goto statement, saving stack space and avoiding the overhead of additional call and return instructions.
Inline Expansion
Inline expansion is similar to function inlining; it substitutes function calls with the actual code of the function to eliminate call and return overhead.
Constant Folding
Constant folding computes constant expressions at compile time rather than at runtime, reducing the number of instructions executed.
Loop Invariant Code Motion
Loop invariant code motion moves code that computes the same result in every loop iteration outside the loop, reducing unnecessary repetitive computations.
Code Motion
Code motion repositions code to a more efficient location, typically moving invariants out of loops to reduce the number of calculations.
Loop Fission
Loop fission divides a loop into multiple separate loops, each handling part of the loop's body, which can improve cache performance and parallelism.
Induction Variable Simplification
Induction variable simplification rewrites loop induction variables in a simpler form, which can lead to more efficient code by removing needless calculations.
Register Allocation
Register allocation assigns variables to machine registers to reduce memory access and improve execution speed by optimizing the usage of limited CPU registers.
Inline Caching
Inline caching optimizes method calls by caching information about where to find object properties or method implementations, reducing the cost of subsequent lookups.
Dead Code Elimination
Dead code elimination removes code that does not affect the program output, thus reducing code size and improving performance.
Strength Reduction
Strength reduction replaces expensive operations with equivalent but less costly ones, often used in optimizing loop performance.
Loop Unrolling
Loop unrolling increases the body of a loop in order to decrease the number of iterations, potentially reducing loop overhead and enabling further optimizations.
Control Flow Graph Reduction
Control flow graph (CFG) reduction simplifies the control flow graph of a program, combining or eliminating nodes and edges to reduce the complexity of the program's control flow.
Predicate Elimination
Predicate elimination removes unnecessary conditional checks by proving that predicates are always true or false, streamlining control flow and avoiding unnecessary branching.
© Hypatia.Tech. 2024 All rights reserved.