Add pure attribute of node processing functions
Open
iotile-sensorgraph
type:enhancement
- Dominant language
- Python
- Stars
- 14
- Forks
- 7
- PR merge metrics
- No merged PRs in 30d
Description
Right now, the dead code eliminator needs to know if a node could have side effects due to its execution in order to not eliminate it if its output is unused. We hardcode the names of the processing functions that have side effects into the DeadCodeElimination optimization pass but this is not great.
We should add a `pure` attribute to the processing functions themselves and check if the processing function is pure in order to know if it can be eliminated.
Contributor guide
Assessment
This issue has not been assessed yet.