Add a generic operand visitor to `GenTree`.
authorPat Gavlin <pagavlin@microsoft.com>
Wed, 28 Jun 2017 14:13:11 +0000 (07:13 -0700)
committerPat Gavlin <pagavlin@microsoft.com>
Thu, 29 Jun 2017 22:10:54 +0000 (15:10 -0700)
commitabcfe9aba9508e964596c0b58644b4a6b5ed4ebe
tree1ac0e9e32970f517b595e52fd7aa45eaf7b28e30
parentdf107780fcb850b223f34e3b062c7f70a7476000
Add a generic operand visitor to `GenTree`.

This visitor accepts any invokable argument (e.g. lambdas, functors,
etc.) with the following signature:

    `GenTree::VisitResult Visitor(GenTree* operand)`

This visitor is typically more efficient than the operand iterator
due to better opportunities for inlining and shorter dynamic path
lengths when deciding which operands need to be visited.

Commit migrated from https://github.com/dotnet/coreclr/commit/9f9a7efe3950c8cb22ffdfc7074e26c350bb4b6a
src/coreclr/src/jit/compiler.hpp
src/coreclr/src/jit/gentree.h