Exercises for Week 48

Exercises for Week 48#

Important

These exercises are in a draft status and will be updated before the week begins.

Exercise overview#

This week’s exercises focus on compiler optimizations - techniques for improving the performance and efficiency of generated code.

Topics to be covered#

  • Constant folding and propagation: Compile-time evaluation

  • Dead code elimination: Removing unreachable and unused code

  • Common subexpression elimination: Avoiding redundant computations

  • Loop optimizations: Loop unrolling, invariant code motion

  • Inlining: Function inlining strategies and heuristics

  • Strength reduction: Replacing expensive operations with cheaper ones

  • Alias analysis: Understanding pointer relationships

Detailed exercises will be added soon.