rise-lang / shine

The Shine compiler for the RISE language
https://rise-lang.org
MIT License
73 stars 8 forks source link

Unnecessary end-of-loop barriers #212

Open Bastacyclop opened 3 years ago

Bastacyclop commented 3 years ago

At the end of a loop, there are two possible scenarios:

  1. the loop will be taken again
  2. the loop will be exited

Currently barrier insertion conflates the two, but sometimes more precise barriers could be inserted for the individual scenarios. This is easy noticed for example on 1-trip loops such as in CGO17's Convolution Row benchmark. We know that the loop is only taken once, but we stil insert a barrier for scenario 1. at the end of the loop.

Bastacyclop commented 3 years ago

related to #18