KhronosGroup / SPIRV-Tools

Apache License 2.0
1.09k stars 556 forks source link

spirv-fuzz: Pure functions #3725

Open Vasniktel opened 4 years ago

Vasniktel commented 4 years ago

It might be good to know if a particular function is pure (i.e. it doesn't have any side-effects and its output only depends on its input).

This knowledge would allow us to do some interesting transformations. For example, we could permute calls to such functions.

This idea might be related to #3695. In particular, we would need to know if the function writes through any of its pointer parameters.

Vasniktel commented 4 years ago

We could also consider a transformation that makes functions pure.