<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div></div><div><br><div><div>On Nov 15, 2012, at 3:31 PM, Michael Ilseman <<a href="mailto:milseman@apple.com">milseman@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=windows-1252"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Nov 15, 2012, at 3:23 PM, Joe Abbey <<a href="mailto:joe.abbey@gmail.com">joe.abbey@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=windows-1252"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Though semantically equivalent in this case, however I think you should use logical ors here not bitwise.</div><div><br></div><div><font face="Menlo">+ bool any() {</font></div><div><font face="Menlo">+ return UnsafeAlgebra | NoNaNs | NoInfs | NoSignedZeros |</font></div><div><font face="Menlo">+ AllowReciprocal;</font></div><div><font face="Menlo">+ }</font></div><div><br></div></div></blockquote><div><br></div><div>Will do.</div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Gripe: This pattern is probably super fast and has precedence… but the code is non-obvious:</div><div><br></div><div><font face="Menlo">SubclassOptionalData =</font></div><div><font face="Menlo"><span class="Apple-tab-span" style="white-space:pre"> </span>(SubclassOptionalData & ~BitToSet) | (B * BitToSet);</font></div><div><br></div></div></blockquote><div><br></div><div>This is an existing pattern that's used elsewhere in the file, so I had assumed it was well understood and preferred.</div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>This is likely one iota slower.. but it sure is easier to get the intent.</div><div><br></div><div><div><font face="Menlo">B ? SubclassOptionalData |= </font><span style="font-family: Menlo; ">BitToSet</span><font face="Menlo"> : </font></div><div><font face="Menlo"> SubclassOptionalData &= ~</font><span style="font-family: Menlo; ">BitToSet</span><font face="Menlo">;</font></div><div><br></div><div>Otherwise looks good to me.</div><div><br></div><div>Joe</div><div><br></div></div><div><div>On Nov 15, 2012, at 5:50 PM, Joe Abbey <<a href="mailto:joe.abbey@gmail.com">joe.abbey@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Trying to apply patches..<br><br>What's your base revision?<br><br>Joe<br><br>On Nov 15, 2012, at 5:44 PM, Michael Ilseman <<a href="mailto:milseman@apple.com">milseman@apple.com</a>> wrote:<br><br><blockquote type="cite">New patches with review feedback incorporated:<br> * Changed single letter flags to short abbreviations ('S' ==> 'nsz')<br> * Indentation fixes<br> * Comments don't state function names<br><br><0002-Fast-math-flags-added-to-FPMathOperator.patch><br><0003-Fast-math-interfaces-for-Instructions.patch><br><0004-Fast-math-flags-for-LLVM-IR-parsing-and-printing.patch><br><0005-Fast-math-flags-for-the-bitcode.patch><br><0006-Fast-math-test-case-for-bitcode-and-textual-reading-.patch><br><0007-Fast-math-optimization-fold-multiply-by-zero.patch><br><0008-Fast-math-test-for-SimplifyInstruction-fold-multiply.patch><br><br>On Nov 15, 2012, at 10:51 AM, Evan Cheng <<a href="mailto:evan.cheng@apple.com">evan.cheng@apple.com</a>> wrote:<br><br><blockquote type="cite"><br>On Nov 15, 2012, at 10:51 AM, Michael Ilseman <<a href="mailto:milseman@apple.com">milseman@apple.com</a>> wrote:<br><br><blockquote type="cite"><br>On Nov 15, 2012, at 10:38 AM, Evan Cheng <<a href="mailto:evan.cheng@apple.com">evan.cheng@apple.com</a>> wrote:<br><br><blockquote type="cite">Hi Michael,<br><br>The patch looks good in general. But I'm a bit concerned about the textural representation about these flags. 'N', 'I', 'S', 'R', 'A' seem cryptic to me. Does it make sense to expand them a bit 'nnan', 'inf', etc.? They definitely need to be documented.<br><br></blockquote><br>I think it does make sense to expand them to be more readable. Also, the textual representation doesn't have to precisely follow the internal names. What about:<br>nnan : no nans<br>ninf : no infs<br>nsz : no signed zeros<br>ar: allow reciprocal<br>fast : unsafe algebra (and implicitly all the others)<br></blockquote><br>These seem reasonable to me. Thanks!<br><br>Evan<br><br><blockquote type="cite"><br>I'll get started on documentation.<br><br><blockquote type="cite">Evan<br><br>On Nov 15, 2012, at 10:17 AM, Michael Ilseman <<a href="mailto:milseman@apple.com">milseman@apple.com</a>> wrote:<br><br><blockquote type="cite">Attached are some patches for adding in an IR-level mechanism for representing fast-math flags, as discussed in my prior RFC. Patches include infrastructure, API support, textual and bitcode reader/writer support, example optimization, and test cases.<br><br><0002-Fast-math-flags-added-to-FPMathOperator.patch><br><0003-Fast-math-interfaces-for-Instructions.patch><br><0004-Fast-math-flags-for-LLVM-IR-parsing-and-printing.patch><br><0005-Fast-math-flags-for-the-bitcode.patch><br><0006-Fast-math-test-case-for-bitcode-and-textual-reading-.patch><br><0007-Fast-math-optimization-fold-multiply-by-zero.patch><br><0008-Fast-math-test-for-SimplifyInstruction-fold-multiply.patch><br><br>_______________________________________________<br>LLVM Developers mailing list<br><a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu/">http://llvm.cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br></blockquote><br></blockquote><br></blockquote><br></blockquote><br>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br></blockquote><br></blockquote></div><br></div></blockquote></div><br></div>_______________________________________________<br>llvm-commits mailing list<br><a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits<br></blockquote></div><br></div></body></html>