binaryninja-api
binaryninja-api copied to clipboard
Add `pure` as a function property
What is the feature you'd like to have?
I want to be able to use Edit Function Properties to mark a function as pure. The purpose here would be to allow the call to be optimized out entirely if the return value isn't used.
Is your feature request related to a problem? This could really clean up analysis of things like malware using API hammering. This might also be useful in cases like #2923 (and may even effectively be a duplicate, not entirely sure).
Additional Information: We should probably never set this attribute automatically, except possibly in the case where the user has supplied a header that has the function marked as such.
Note that pure probably isn't the right word after more discussion. The actual attribute is something like "side-effect-free" but we want a more concise name and nobody liked pureish. 😉
Duplicate of #1712