codeql
codeql copied to clipboard
C++: Global value numbering for function calls
trafficstars
This PR adds global value numbering for function calls, taking into account side effects. It also eliminates global side effects for function calls when the function does not use or modify non-local state other than what's immediately pointed to by its parameters.
Small update on this PR. There's a very large performance regression. I would have guessed that it was due to the recursion through forall, but it looks like callPartialValueNumber is to blame. There may just be too much non-linear recursion.