Compilers

Which describes software pipelining?

  1. AA technique that increases the number of CPU pipeline stages in software
  2. BA technique that splits a loop into functions and runs them in parallel on multiple threads
  3. COverlapping different iterations to fill latency
Show answer and explanation

Answer: C. Overlapping different iterations to fill latency

Software pipelining divides one loop iteration into stages such as load, compute and store, then arranges instructions so that, for example, the store for iteration i, the computation for i+1 and the load for i+2 happen within the same loop body. Computation from other iterations proceeds during load latency, keeping functional units busy. Prologue and epilogue code are needed around the loop. It neither changes the CPU's pipeline depth nor parallelizes across threads.

  • A. The CPU's pipeline depth is fixed in hardware.
  • B. It is distinct from thread-level parallelization.
  • C. Correct. It overlaps work from different iterations to fill latency.
Practice this topic Back to topic

More Compilers questions

  1. Why does a compiler with strict settings not reorder the floating-point sum (a + b) + c into a + (b + c) on its own?
  2. Which kind of instruction does a compiler's automatic vectorization use?
  3. What basic condition must compiler optimizations respect?
  4. Which describes instruction selection, one stage of code generation?
  5. Which describes a cross compiler?