iotile / iotile/coretools

Add pure attribute of node processing functions

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

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.