Bikeshedding a name for new directive: CHECK-LABEL vs. CHECK-BOUNDARY vs. something else.

Hi,

I would like to add a new directive to FileCheck called CHECK-FOO
(where FOO is a name under discussion right now) which is used to
improve error messages. The idea is that you would use CHECK-FOO on
any line that contains a unique identifier (typically labels, function
definitions, etc.) that is guaranteed to only occur once in the file;
FileCheck will then conceptually break the break the input into blocks
separated by these unique identifier lines and perform all other
checks localized to between the appropriate blocks; it can ever
recover from an error in one block and move on to another.

As an example, I purposely introduced the a switch fall-through bug in
the last patch I submitted to llvm-commits ("Allow FMAs in safe math
mode in some cases when one operand of the fmul is either exactly 0.0
or exactly 1.0")...

Bug diff:

diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index 0290afc..239b119 100644
--- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -5791,7 +5791,7 @@ static bool isExactlyZeroOrOne(const
TargetLowering &TLI, const SDValue &Op) {
           continue;
         }
       }
- break;
+// break;
     case ISD::FADD:
       if (ConstantFPSDNode *V0CFP =
             dyn_cast<ConstantFPSDNode>(V->getOperand(0))) {

The single error message without CHECK-FOO is:

; CHECK: test_add_8
         ^
<stdin>:125:2: note: scanning from here
.cfi_endproc
^
<stdin>:127:10: note: possible intended match here
.globl _test_add_10
         ^

The error messages with CHECK-FOO on the function name label lines are:

; CHECK: vmulsd
         ^
<stdin>:87:2: note: scanning from here
.align 4, 0x90
^
<stdin>:95:2: note: possible intended match here
vsubsd %xmm0, %xmm3, %xmm0
^
fp-contract.ll:118:15: error: expected string not found in input
; CHECK: vmulsd
         ^
<stdin>:102:2: note: scanning from here
.align 4, 0x90
^
<stdin>:109:2: note: possible intended match here
vsubsd %xmm2, %xmm3, %xmm2
^
fp-contract.ll:288:15: error: expected string not found in input
; CHECK: vmulsd
         ^
<stdin>:258:2: note: scanning from here
.align 4, 0x90
^
<stdin>:266:2: note: possible intended match here
vsubsd %xmm0, %xmm3, %xmm0
^

Does anyone have a suggestions on what FOO should be? In my current
patch it's currently LABEL, but Eli. B. suggested BOUNDARY

Any opinions or other suggestions?

Thanks,
Stephen

OK, it was two votes to one so I went with CHECK-LABEL, r186162.