google / google/xls

Convert multiplies to running adds

Open
#839 0 comments 0 reactions 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.