Although compiler tries to rearrange instructions to avoid stalls, this rearrangement could get very complex for the compiler to analyze. However, in case of loops with independent iterations, this can be useful to hide stalls easily (loop unrolling). At times, this is a useful optimization done in the application code as well and might be much more useful in parallel computing.
This comment was marked helpful 0 times.
gbarboza
See these slides for a look at how compilers reason about data dependencies. They also briefly discuss how SIMD instructions are generated!
Although compiler tries to rearrange instructions to avoid stalls, this rearrangement could get very complex for the compiler to analyze. However, in case of loops with independent iterations, this can be useful to hide stalls easily (loop unrolling). At times, this is a useful optimization done in the application code as well and might be much more useful in parallel computing.
This comment was marked helpful 0 times.
See these slides for a look at how compilers reason about data dependencies. They also briefly discuss how SIMD instructions are generated!
This comment was marked helpful 0 times.