<HTML><BODY>1)<br>     (SubclassData & ~NUW) | (b * NUW);<br>Maybe better to write somehow<br>(SubclassData & ~NUW) | (b ? NUW : 0);<br>IMHO it is more readable<br><br>2) const BinarySDNode *BinNode = static_cast<const BinarySDNode*>(N);<br>formatting: \t...<br>+                BinNode->hasNoUnsignedWrap(),<br>+         BinNode->hasNoSignedWrap(),<br>+         BinNode->isExact());<br>the same...<br>+                    bool nsw, bool exact) {<br>+          bool nsw, bool exact) {<br>+        Op1, Op2, HasNUW, HasNSW, IsExact);<br>+ if (BinNode->hasNoSignedWrap())<br>+   break;<br><br>3) Maybe better to remove bundle of cases on low level?<br>In order to reduce duplication of code...<br><br><br><br>Sat, 31 May 2014 19:30:24 -0700 от Marcello Maggioni <hayarms@gmail.com>:<br>
<blockquote style="margin: 10px; padding: 0px 0px 0px 10px; border-left-color: rgb(8, 87, 166); border-left-width: 1px; border-left-style: solid;">
        <div>
        



    









        
        


        
        
        
        
        

        
        

        
        



<div class="js-helper js-readmsg-msg">
        <style type="text/css"></style>
        <div>
                <base href="https://e.mail.ru/" target="_self">
                
                        <div id="style_14015901020000000699_BODY"><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>

</div>
                        <div>_______________________________________________<br>
llvm-commits mailing list<br>
<a href="/compose?To=llvm%2dcommits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
<br>
</div>
                
                <base href="https://e.mail.ru/" target="_self">
        </div>

        
</div>


</div>
</blockquote>
<br></BODY></HTML>