Add mechanism for expecting certain optimization outcomes
- Dominant language
- C++
- Stars
- 1.9k
- Forks
- 283
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 135
Description
The user may expect that certain source constructs are lowered into a particular form (e.g., this match statement of chain of if/then/else should become a table lookup). It would be nice if the user could express some of the expectations as annotations in the source code. XLS would emit a (hopefully) helpful error when the expectation is not met. I don't know exactly how this might work and what kind of assumptions we would want to support.
From an internal discussion on the issue:
I think these kinds of warnings or messages to the user about failed optimizations are easiest if the user can convey their expectations via a pragma/annotation. The reason being is that a zillion optimizations may fail to fire during the optimization pipeline and telling the user about every one is not helpful. However, if the user can say something like: "I want only one multiplier" like from the previous comment, or "make sure this construct is optimized to this" (whatever "this" is). Then it makes is much more likely that you'll get a useful message in the end. Will definitely have to think about how to give the user useful annotations of this type.
Contributor guide
Assessment
This issue has not been assessed yet.