<div dir="ltr">Here an updated patch.<div><br></div><div>The changes are:</div><div><br></div><div>- I stripped away the new getBinaryNode function and integrated the functionality in the getNode() function with two operands.</div>
<div>- I removed the refactoring for the binary folding logic. Removing getBinaryNode() makes putting that logic in an external function not needed. (this also fixes the clang-format problem Owen pointed out).</div><div>- Cleaned up some stuff and fixed some style problems.</div>
<div>- Integrated the changes Pete pointed out:</div><div>  - Added the flags to the NodeID construction</div><div>  - Created a test case for the CSE (not sure it is the best test though ... I'm not an expert testing this kind of stuff)</div>
<div>  - Merged the test for the performance optimization in the optimization patch.</div><div>  - Integrated the code cleanups that were specified.</div><div>  - Reduced the test case for the x86 opt.</div><div><br></div>
<div>Now as a result there are only two patches:</div><div>  - flag_nodes.patch</div><div>  - x86_opt_wrap.patch</div><div><br></div><div>I didn't changed BinarySDNode to have classof(), because I think is probably better doing it separately , but also because it is kind of more complex than it seems , because it is not clear exactly what are the opcodes that become BinarySDNodes (a part from the obvious binary ADD, SUB ... etc operations).</div>
<div>It is probably necessary to take more time to collect an accurate list of all the opcodes that always end up being lowered as BinarySDNodes and add the classof() then.</div><div><br></div><div>Marcello</div><div><br>
</div><div><br></div></div>