This commit removes the SIMPLIFY_BRANCH_ARITHMETIC and replaces it with a templated instantiation that seeks to emulate a closure. The templated class is provided with the mutators and accessors for nodes so tha tthe notation of passing in getter names through the macro is no longer needed
The logic from the original macro to check whether a node is a viable candidate for simplification and which optimization to perform is simplified.
The old macro also contained side effects which modified the local variables at the call site and this has been removed and replaced with equivalent semantics.
This commit removes the SIMPLIFY_BRANCH_ARITHMETIC and replaces it with a templated instantiation that seeks to emulate a closure. The templated class is provided with the mutators and accessors for nodes so tha tthe notation of passing in getter names through the macro is no longer needed
The logic from the original macro to check whether a node is a viable candidate for simplification and which optimization to perform is simplified.
The old macro also contained side effects which modified the local variables at the call site and this has been removed and replaced with equivalent semantics.