<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;">On Jul 11, 2013, at 12:44 PM, Stephen Lin <<a href="mailto:swlin@post.harvard.edu">swlin@post.harvard.edu</a>> wrote:<br><div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Actually, I would be ok with CHECK-BOUND as well.<br>Eli, is that OK to you? And does anyone else want to chime in?<br></div></blockquote><div dir="auto"><br></div><div dir="auto">I also really like this feature. Thanks Stephen.</div><div dir="auto"><br></div><div dir="auto">I like CHECK-LABEL, and don’t think it would be too confusing.</div><div dir="auto"><br></div><div dir="auto">-Andy</div><br><blockquote type="cite"><div style="font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">I will expand the docs either way.<br>Thanks,<br>Stephen<br><br>On Thu, Jul 11, 2013 at 12:40 PM, Stephen Lin <<a href="mailto:swlin@post.harvard.edu">swlin@post.harvard.edu</a>> wrote:<br><blockquote type="cite">Thanks Owen; Andy (Trick) off-list says he thinks it's a good idea, too.<br><br>Eli B. (also off-list) thinks that the documentation can be approved<br>and also suggests that the name CHECK-BOUNDARY is better. Anyone else<br>have an opinion?<br><br>I much prefer CHECK-LABEL to CHECK-BOUNDARY myself, but I am willing<br>to paint the bike shed whatever color others can agree on.<br><br>Stephen<br><br>On Thu, Jul 11, 2013 at 12:31 PM, Owen Anderson <<a href="mailto:resistor@mac.com">resistor@mac.com</a>> wrote:<br><blockquote type="cite">I'm not familiar enough with the FileCheck internals to comment on the implementation, but I *really* like this feature.  I've spent way too much time over the years tracking down cryptic FileCheck errors that would have been solved by this.<br><br>--Owen<br><br>On Jul 11, 2013, at 10:50 AM, Stephen Lin <<a href="mailto:swlin@post.harvard.edu">swlin@post.harvard.edu</a>> wrote:<br><br><blockquote type="cite">Hi,<br><br>Can anyone review this patch? It adds a new directive type called<br>"CHECK-LABEL" to FileCheck...<br><br>If present in a match file, FileCheck will use these directives to<br>split the input into blocks that are independently processed, ensuring<br>that a CHECK does not inadvertently match a line in a different block<br>(which can lead to a misleading/useless error message when the error<br>is eventually caught). Also, FileCheck can now recover from errors<br>within blocks by continuing to the next block.<br><br>As an example, I purposely introduced the a switch fall-through bug in<br>the last patch I submitted to llvm-commits ("Allow FMAs in safe math<br>mode in some cases when one operand of the fmul is either exactly 0.0<br>or exactly 1.0")...<br><br>Bug diff:<br><br>diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp<br>b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp<br>index 0290afc..239b119 100644<br>--- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp<br>+++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp<br>@@ -5791,7 +5791,7 @@ static bool isExactlyZeroOrOne(const<br>TargetLowering &TLI, const SDValue &Op) {<br>         continue;<br>       }<br>     }<br>-      break;<br>+//      break;<br>   case ISD::FADD:<br>     if (ConstantFPSDNode *V0CFP =<br>           dyn_cast<ConstantFPSDNode>(V->getOperand(0))) {<br><br>The single error message without CHECK-LABEL is:<br><br>; CHECK-SAFE: test_add_8<br>            ^<br><stdin>:125:2: note: scanning from here<br>.cfi_endproc<br>^<br><stdin>:127:10: note: possible intended match here<br>.globl _test_add_10<br>       ^<br><br>The error messages with CHECK-LABEL are:<br><br>; CHECK-SAFE: vmulsd<br>            ^<br><stdin>:87:2: note: scanning from here<br>.align 4, 0x90<br>^<br><stdin>:95:2: note: possible intended match here<br>vsubsd %xmm0, %xmm3, %xmm0<br>^<br>fp-contract.ll:118:15: error: expected string not found in input<br>; CHECK-SAFE: vmulsd<br>            ^<br><stdin>:102:2: note: scanning from here<br>.align 4, 0x90<br>^<br><stdin>:109:2: note: possible intended match here<br>vsubsd %xmm2, %xmm3, %xmm2<br>^<br>fp-contract.ll:288:15: error: expected string not found in input<br>; CHECK-SAFE: vmulsd<br>            ^<br><stdin>:258:2: note: scanning from here<br>.align 4, 0x90<br>^<br><stdin>:266:2: note: possible intended match here<br>vsubsd %xmm0, %xmm3, %xmm0<br>^<br><br>The three error messages in the CHECK-LABEL case exactly pinpoint the<br>source lines of the actual problem in three separate blocks; the<br>single error message given without CHECK-LABEL is (imho) much less<br>useful.<br><br>(In this case, the non-CHECK-LABEL version happens to error on the on<br>a label line, so the user could presume that the error happened in the<br>block immediately before test_add_8, which is correct, but in general<br>this might not be true; the only thing that can be concluded is that<br>the error happened sometime before test_add_8.)<br><br>Please let me know if you have any feedback.<br><br>Stephen<br><br>---------- Forwarded message ----------<br>From: Stephen Lin <<a href="mailto:swlin@apple.com">swlin@apple.com</a>><br>Date: Mon, Jun 10, 2013 at 4:21 PM<br>Subject: [PATCH] Add CHECK-LABEL directive to FileCheck to allow more<br>accurate error messages and error recovery<br>To: <a href="mailto:llvm-commits@cs.uiuc.edu">llvm-commits@cs.uiuc.edu</a><br><br><br>Actually, I went ahead and renamed it CHECK-LABEL and rebased, since I<br>think it’s better :)<br>-Stephen<br><check-label.patch>_______________________________________________<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><br><br>_______________________________________________<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</blockquote></blockquote></div></blockquote></div><br></body></html>