Convert multiplies to running adds
Open
enhancement
ir
optimizer
- Dominant language
- C++
- Stars
- 1.9k
- Forks
- 283
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 135
Description
If a proc has a state element `x` that is continually incremented (`x_next = x + delta_x`), and somewhere in the proc body `y = k * x` is computed, the code can be modified to replace the multiply by a register and an add (`y_next = y + (k * delta_x)`). This will require some basic notion of scalar evolution to determine that `x` is continually incremented.
Contributor guide
Assessment
This issue has not been assessed yet.