From 21ee4e987f4f3b4d8a55b284dcc25c5220e894f3 Mon Sep 17 00:00:00 2001 From: River Riddle Date: Wed, 23 Oct 2019 15:56:02 -0700 Subject: [PATCH] Add @below and @above directives to verify-diagnostics. This simplifies defining expected-* directives when there are multiple that apply to the next or previous line. @below applies the directive to the next non-designator line, i.e. the next line that does not contain an expected-* designator. @above applies to the previous non designator line. Examples: // Expect an error on the next line that does not contain a designator. // expected-remark@below {{remark on function below}} // expected-remark@below {{another remark on function below}} func @bar(%a : f32) // Expect an error on the previous line that does not contain a designator. func @baz(%a : f32) // expected-remark@above {{remark on function above}} // expected-remark@above {{another remark on function above}} PiperOrigin-RevId: 276369085 --- mlir/g3doc/Diagnostics.md | 11 + mlir/lib/IR/Diagnostics.cpp | 46 +- mlir/test/IR/invalid-module-op.mlir | 4 +- mlir/test/IR/test-symbol-uses.mlir | 6 +- mlir/test/Transforms/memref-dependence-check.mlir | 604 +++++++++++----------- 5 files changed, 357 insertions(+), 314 deletions(-) diff --git a/mlir/g3doc/Diagnostics.md b/mlir/g3doc/Diagnostics.md index 7589e78..457cab8 100644 --- a/mlir/g3doc/Diagnostics.md +++ b/mlir/g3doc/Diagnostics.md @@ -274,6 +274,17 @@ func @foo(%a : f32) { %result = cmpf "foo", %a, %a : f32 return } + +// Expect an error on the next line that does not contain a designator. +// expected-remark@below {{remark on function below}} +// expected-remark@below {{another remark on function below}} +func @bar(%a : f32) + +// Expect an error on the previous line that does not contain a designator. +func @baz(%a : f32) +// expected-remark@above {{remark on function above}} +// expected-remark@above {{another remark on function above}} + ``` The handler will report an error if any unexpected diagnostics were seen, or if diff --git a/mlir/lib/IR/Diagnostics.cpp b/mlir/lib/IR/Diagnostics.cpp index cdf08f6..2e15438 100644 --- a/mlir/lib/IR/Diagnostics.cpp +++ b/mlir/lib/IR/Diagnostics.cpp @@ -551,8 +551,8 @@ struct SourceMgrDiagnosticVerifierHandlerImpl { llvm::StringMap> expectedDiagsPerFile; /// Regex to match the expected diagnostics format. - llvm::Regex expected = llvm::Regex( - "expected-(error|note|remark|warning) *(@[+-][0-9]+)? *{{(.*)}}"); + llvm::Regex expected = llvm::Regex("expected-(error|note|remark|warning) " + "*(@([+-][0-9]+|above|below))? *{{(.*)}}"); }; } // end namespace detail } // end namespace mlir @@ -590,13 +590,28 @@ SourceMgrDiagnosticVerifierHandlerImpl::computeExpectedDiags( return llvm::None; auto &expectedDiags = expectedDiagsPerFile[buf->getBufferIdentifier()]; + // The number of the last line that did not correlate to a designator. + unsigned lastNonDesignatorLine = 0; + + // The indices of designators that apply to the next non designator line. + SmallVector designatorsForNextLine; + // Scan the file for expected-* designators. SmallVector lines; buf->getBuffer().split(lines, '\n'); for (unsigned lineNo = 0, e = lines.size(); lineNo < e; ++lineNo) { SmallVector matches; - if (!expected.match(lines[lineNo], &matches)) + if (!expected.match(lines[lineNo], &matches)) { + // Check for designators that apply to this line. + if (!designatorsForNextLine.empty()) { + for (unsigned diagIndex : designatorsForNextLine) + expectedDiags[diagIndex].lineNo = lineNo + 1; + designatorsForNextLine.clear(); + } + lastNonDesignatorLine = lineNo; continue; + } + // Point to the start of expected-*. auto expectedStart = llvm::SMLoc::getFromPointer(matches[0].data()); @@ -612,16 +627,33 @@ SourceMgrDiagnosticVerifierHandlerImpl::computeExpectedDiags( kind = DiagnosticSeverity::Note; } - ExpectedDiag record{kind, lineNo + 1, matches[3], expectedStart, false}; + ExpectedDiag record{kind, lineNo + 1, matches[4], expectedStart, false}; auto offsetMatch = matches[2]; if (!offsetMatch.empty()) { - int offset; + offsetMatch = offsetMatch.drop_front(1); + // Get the integer value without the @ and +/- prefix. - if (!offsetMatch.drop_front(2).getAsInteger(0, offset)) { - if (offsetMatch[1] == '+') + if (offsetMatch[0] == '+' || offsetMatch[0] == '-') { + int offset; + offsetMatch.drop_front().getAsInteger(0, offset); + + if (offsetMatch.front() == '+') record.lineNo += offset; else record.lineNo -= offset; + } else if (offsetMatch.consume_front("above")) { + // If the designator applies 'above' we add it to the last non + // designator line. + record.lineNo = lastNonDesignatorLine + 1; + } else { + // Otherwise, this is a 'below' designator and applies to the next + // non-designator line. + assert(offsetMatch.consume_front("below")); + designatorsForNextLine.push_back(expectedDiags.size()); + + // Set the line number to the last in the case that this designator ends + // up dangling. + record.lineNo = e; } } expectedDiags.push_back(record); diff --git a/mlir/test/IR/invalid-module-op.mlir b/mlir/test/IR/invalid-module-op.mlir index 440c994..02cdebb 100644 --- a/mlir/test/IR/invalid-module-op.mlir +++ b/mlir/test/IR/invalid-module-op.mlir @@ -27,8 +27,8 @@ func @module_op() { // ----- func @module_op() { - // expected-error@+2 {{expects regions to end with 'module_terminator'}} - // expected-note@+1 {{the absence of terminator implies 'module_terminator'}} + // expected-error@below {{expects regions to end with 'module_terminator'}} + // expected-note@below {{the absence of terminator implies 'module_terminator'}} module { return } diff --git a/mlir/test/IR/test-symbol-uses.mlir b/mlir/test/IR/test-symbol-uses.mlir index b6bdbeb..78473e9 100644 --- a/mlir/test/IR/test-symbol-uses.mlir +++ b/mlir/test/IR/test-symbol-uses.mlir @@ -6,9 +6,9 @@ module attributes {sym.outside_use = @symbol_foo } { // expected-remark@+1 {{function has 2 uses}} func @symbol_foo() - // expected-remark@+3 {{function has no uses}} - // expected-remark@+2 {{found use of function : @symbol_foo}} - // expected-remark@+1 {{function contains 2 nested references}} + // expected-remark@below {{function has no uses}} + // expected-remark@below {{found use of function : @symbol_foo}} + // expected-remark@below {{function contains 2 nested references}} func @symbol_bar() attributes {sym.use = @symbol_foo} { // expected-remark@+1 {{found use of function : @symbol_foo}} "foo.op"() { diff --git a/mlir/test/Transforms/memref-dependence-check.mlir b/mlir/test/Transforms/memref-dependence-check.mlir index 3efc134..03b6c74 100644 --- a/mlir/test/Transforms/memref-dependence-check.mlir +++ b/mlir/test/Transforms/memref-dependence-check.mlir @@ -15,16 +15,16 @@ func @store_may_execute_before_load() { affine.if #set0(%c0) { affine.for %i0 = 0 to 10 { affine.store %cf7, %m[%i0] : memref<10xf32> - // expected-remark@-1 {{dependence from 0 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 0 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 0 to 1 at depth 1 = true}} + // expected-remark@above {{dependence from 0 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 1 = true}} } } affine.for %i1 = 0 to 10 { %v0 = affine.load %m[%i1] : memref<10xf32> - // expected-remark@-1 {{dependence from 1 to 1 at depth 1 = false}} - // expected-remark@-2 {{dependence from 1 to 1 at depth 2 = false}} - // expected-remark@-3 {{dependence from 1 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 1 = false}} } return } @@ -39,15 +39,15 @@ func @dependent_loops() { // because the first loop with the store dominates the second loop. affine.for %i0 = 0 to 10 { affine.store %cst, %0[%i0] : memref<10xf32> - // expected-remark@-1 {{dependence from 0 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 0 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 0 to 1 at depth 1 = true}} + // expected-remark@above {{dependence from 0 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 1 = true}} } affine.for %i1 = 0 to 10 { %1 = affine.load %0[%i1] : memref<10xf32> - // expected-remark@-1 {{dependence from 1 to 1 at depth 1 = false}} - // expected-remark@-2 {{dependence from 1 to 1 at depth 2 = false}} - // expected-remark@-3 {{dependence from 1 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 1 = false}} } return } @@ -60,11 +60,11 @@ func @different_memrefs() { %c0 = constant 0 : index %c1 = constant 1.0 : f32 affine.store %c1, %m.a[%c0] : memref<100xf32> - // expected-remark@-1 {{dependence from 0 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 0 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 1 = false}} %v0 = affine.load %m.b[%c0] : memref<100xf32> - // expected-remark@-1 {{dependence from 1 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 1 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 1 = false}} return } @@ -76,11 +76,11 @@ func @store_load_different_elements() { %c1 = constant 1 : index %c7 = constant 7.0 : f32 affine.store %c7, %m[%c0] : memref<100xf32> - // expected-remark@-1 {{dependence from 0 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 0 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 1 = false}} %v0 = affine.load %m[%c1] : memref<100xf32> - // expected-remark@-1 {{dependence from 1 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 1 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 1 = false}} return } @@ -92,11 +92,11 @@ func @load_store_different_elements() { %c1 = constant 1 : index %c7 = constant 7.0 : f32 %v0 = affine.load %m[%c1] : memref<100xf32> - // expected-remark@-1 {{dependence from 0 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 0 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 1 = false}} affine.store %c7, %m[%c0] : memref<100xf32> - // expected-remark@-1 {{dependence from 1 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 1 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 1 = false}} return } @@ -107,11 +107,11 @@ func @store_load_same_element() { %c11 = constant 11 : index %c7 = constant 7.0 : f32 affine.store %c7, %m[%c11] : memref<100xf32> - // expected-remark@-1 {{dependence from 0 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 0 to 1 at depth 1 = true}} + // expected-remark@above {{dependence from 0 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 1 = true}} %v0 = affine.load %m[%c11] : memref<100xf32> - // expected-remark@-1 {{dependence from 1 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 1 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 1 = false}} return } @@ -122,11 +122,11 @@ func @load_load_same_element() { %c11 = constant 11 : index %c7 = constant 7.0 : f32 %v0 = affine.load %m[%c11] : memref<100xf32> - // expected-remark@-1 {{dependence from 0 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 0 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 1 = false}} %v1 = affine.load %m[%c11] : memref<100xf32> - // expected-remark@-1 {{dependence from 1 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 1 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 1 = false}} return } @@ -136,11 +136,11 @@ func @store_load_same_symbol(%arg0: index) { %m = alloc() : memref<100xf32> %c7 = constant 7.0 : f32 affine.store %c7, %m[%arg0] : memref<100xf32> - // expected-remark@-1 {{dependence from 0 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 0 to 1 at depth 1 = true}} + // expected-remark@above {{dependence from 0 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 1 = true}} %v0 = affine.load %m[%arg0] : memref<100xf32> - // expected-remark@-1 {{dependence from 1 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 1 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 1 = false}} return } @@ -150,11 +150,11 @@ func @store_load_different_symbols(%arg0: index, %arg1: index) { %m = alloc() : memref<100xf32> %c7 = constant 7.0 : f32 affine.store %c7, %m[%arg0] : memref<100xf32> - // expected-remark@-1 {{dependence from 0 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 0 to 1 at depth 1 = true}} + // expected-remark@above {{dependence from 0 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 1 = true}} %v0 = affine.load %m[%arg1] : memref<100xf32> - // expected-remark@-1 {{dependence from 1 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 1 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 1 = false}} return } @@ -166,12 +166,12 @@ func @store_load_diff_element_affine_apply_const() { %c8 = constant 8.0 : f32 %a0 = affine.apply (d0) -> (d0) (%c1) affine.store %c8, %m[%a0] : memref<100xf32> - // expected-remark@-1 {{dependence from 0 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 0 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 1 = false}} %a1 = affine.apply (d0) -> (d0 + 1) (%c1) %v0 = affine.load %m[%a1] : memref<100xf32> - // expected-remark@-1 {{dependence from 1 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 1 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 1 = false}} return } @@ -184,12 +184,12 @@ func @store_load_same_element_affine_apply_const() { %c11 = constant 11 : index %a0 = affine.apply (d0) -> (d0 + 1) (%c9) affine.store %c7, %m[%a0] : memref<100xf32> - // expected-remark@-1 {{dependence from 0 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 0 to 1 at depth 1 = true}} + // expected-remark@above {{dependence from 0 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 1 = true}} %a1 = affine.apply (d0) -> (d0 - 1) (%c11) %v0 = affine.load %m[%a1] : memref<100xf32> - // expected-remark@-1 {{dependence from 1 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 1 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 1 = false}} return } @@ -200,12 +200,12 @@ func @store_load_affine_apply_symbol(%arg0: index) { %c7 = constant 7.0 : f32 %a0 = affine.apply (d0) -> (d0) (%arg0) affine.store %c7, %m[%a0] : memref<100xf32> - // expected-remark@-1 {{dependence from 0 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 0 to 1 at depth 1 = true}} + // expected-remark@above {{dependence from 0 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 1 = true}} %a1 = affine.apply (d0) -> (d0) (%arg0) %v0 = affine.load %m[%a1] : memref<100xf32> - // expected-remark@-1 {{dependence from 1 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 1 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 1 = false}} return } @@ -216,12 +216,12 @@ func @store_load_affine_apply_symbol_offset(%arg0: index) { %c7 = constant 7.0 : f32 %a0 = affine.apply (d0) -> (d0) (%arg0) affine.store %c7, %m[%a0] : memref<100xf32> - // expected-remark@-1 {{dependence from 0 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 0 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 1 = false}} %a1 = affine.apply (d0) -> (d0 + 1) (%arg0) %v0 = affine.load %m[%a1] : memref<100xf32> - // expected-remark@-1 {{dependence from 1 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 1 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 1 = false}} return } @@ -234,16 +234,16 @@ func @store_range_load_after_range() { affine.for %i0 = 0 to 10 { %a0 = affine.apply (d0) -> (d0) (%i0) affine.store %c7, %m[%a0] : memref<100xf32> - // expected-remark@-1 {{dependence from 0 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 0 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 0 to 1 at depth 1 = false}} - // expected-remark@-4 {{dependence from 0 to 1 at depth 2 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 2 = false}} %a1 = affine.apply (d0) -> (d0) (%c10) %v0 = affine.load %m[%a1] : memref<100xf32> - // expected-remark@-1 {{dependence from 1 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 1 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 1 to 1 at depth 1 = false}} - // expected-remark@-4 {{dependence from 1 to 1 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 2 = false}} } return } @@ -257,16 +257,16 @@ func @store_load_func_symbol(%arg0: index, %arg1: index) { affine.for %i0 = 0 to %arg1 { %a0 = affine.apply (d0) -> (d0) (%arg0) affine.store %c7, %m[%a0] : memref<100xf32> - // expected-remark@-1 {{dependence from 0 to 0 at depth 1 = [1, +inf]}} - // expected-remark@-2 {{dependence from 0 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 0 to 1 at depth 1 = [1, +inf]}} - // expected-remark@-4 {{dependence from 0 to 1 at depth 2 = true}} + // expected-remark@above {{dependence from 0 to 0 at depth 1 = [1, +inf]}} + // expected-remark@above {{dependence from 0 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 1 = [1, +inf]}} + // expected-remark@above {{dependence from 0 to 1 at depth 2 = true}} %a1 = affine.apply (d0) -> (d0) (%arg0) %v0 = affine.load %m[%a1] : memref<100xf32> - // expected-remark@-1 {{dependence from 1 to 0 at depth 1 = [1, +inf]}} - // expected-remark@-2 {{dependence from 1 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 1 to 1 at depth 1 = false}} - // expected-remark@-4 {{dependence from 1 to 1 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 1 = [1, +inf]}} + // expected-remark@above {{dependence from 1 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 2 = false}} } return } @@ -283,18 +283,18 @@ func @store_range_load_last_in_range() { // because only the final write in the loop accesses the same element as the // load, so this dependence appears only at depth 2 (loop independent). affine.store %c7, %m[%a0] : memref<100xf32> - // expected-remark@-1 {{dependence from 0 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 0 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 0 to 1 at depth 1 = false}} - // expected-remark@-4 {{dependence from 0 to 1 at depth 2 = true}} + // expected-remark@above {{dependence from 0 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 2 = true}} %a1 = affine.apply (d0) -> (d0 - 1) (%c10) // For dependence from 1 to 0, we have write-after-read (WAR) dependences // for all loads in the loop to the store on the last iteration. %v0 = affine.load %m[%a1] : memref<100xf32> - // expected-remark@-1 {{dependence from 1 to 0 at depth 1 = [1, 9]}} - // expected-remark@-2 {{dependence from 1 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 1 to 1 at depth 1 = false}} - // expected-remark@-4 {{dependence from 1 to 1 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 1 = [1, 9]}} + // expected-remark@above {{dependence from 1 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 2 = false}} } return } @@ -308,16 +308,16 @@ func @store_range_load_before_range() { affine.for %i0 = 1 to 11 { %a0 = affine.apply (d0) -> (d0) (%i0) affine.store %c7, %m[%a0] : memref<100xf32> - // expected-remark@-1 {{dependence from 0 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 0 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 0 to 1 at depth 1 = false}} - // expected-remark@-4 {{dependence from 0 to 1 at depth 2 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 2 = false}} %a1 = affine.apply (d0) -> (d0) (%c0) %v0 = affine.load %m[%a1] : memref<100xf32> - // expected-remark@-1 {{dependence from 1 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 1 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 1 to 1 at depth 1 = false}} - // expected-remark@-4 {{dependence from 1 to 1 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 2 = false}} } return } @@ -334,16 +334,16 @@ func @store_range_load_first_in_range() { // constant index zero are reads after first store at index zero during // first iteration of the loop. affine.store %c7, %m[%a0] : memref<100xf32> - // expected-remark@-1 {{dependence from 0 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 0 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 0 to 1 at depth 1 = [1, 9]}} - // expected-remark@-4 {{dependence from 0 to 1 at depth 2 = true}} + // expected-remark@above {{dependence from 0 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 1 = [1, 9]}} + // expected-remark@above {{dependence from 0 to 1 at depth 2 = true}} %a1 = affine.apply (d0) -> (d0 + 1) (%c0) %v0 = affine.load %m[%a1] : memref<100xf32> - // expected-remark@-1 {{dependence from 1 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 1 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 1 to 1 at depth 1 = false}} - // expected-remark@-4 {{dependence from 1 to 1 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 2 = false}} } return } @@ -356,16 +356,16 @@ func @store_plus_3() { affine.for %i0 = 1 to 11 { %a0 = affine.apply (d0) -> (d0 + 3) (%i0) affine.store %c7, %m[%a0] : memref<100xf32> - // expected-remark@-1 {{dependence from 0 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 0 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 0 to 1 at depth 1 = [3, 3]}} - // expected-remark@-4 {{dependence from 0 to 1 at depth 2 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 1 = [3, 3]}} + // expected-remark@above {{dependence from 0 to 1 at depth 2 = false}} %a1 = affine.apply (d0) -> (d0) (%i0) %v0 = affine.load %m[%a1] : memref<100xf32> - // expected-remark@-1 {{dependence from 1 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 1 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 1 to 1 at depth 1 = false}} - // expected-remark@-4 {{dependence from 1 to 1 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 2 = false}} } return } @@ -378,16 +378,16 @@ func @load_minus_2() { affine.for %i0 = 2 to 11 { %a0 = affine.apply (d0) -> (d0) (%i0) affine.store %c7, %m[%a0] : memref<100xf32> - // expected-remark@-1 {{dependence from 0 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 0 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 0 to 1 at depth 1 = [2, 2]}} - // expected-remark@-4 {{dependence from 0 to 1 at depth 2 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 1 = [2, 2]}} + // expected-remark@above {{dependence from 0 to 1 at depth 2 = false}} %a1 = affine.apply (d0) -> (d0 - 2) (%i0) %v0 = affine.load %m[%a1] : memref<100xf32> - // expected-remark@-1 {{dependence from 1 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 1 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 1 to 1 at depth 1 = false}} - // expected-remark@-4 {{dependence from 1 to 1 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 2 = false}} } return } @@ -403,21 +403,21 @@ func @perfectly_nested_loops_loop_independent() { %a00 = affine.apply (d0, d1) -> (d0) (%i0, %i1) %a01 = affine.apply (d0, d1) -> (d1) (%i0, %i1) affine.store %c7, %m[%a00, %a01] : memref<10x10xf32> - // expected-remark@-1 {{dependence from 0 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 0 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 0 to 0 at depth 3 = false}} - // expected-remark@-4 {{dependence from 0 to 1 at depth 1 = false}} - // expected-remark@-5 {{dependence from 0 to 1 at depth 2 = false}} - // expected-remark@-6 {{dependence from 0 to 1 at depth 3 = true}} + // expected-remark@above {{dependence from 0 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 3 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 2 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 3 = true}} %a10 = affine.apply (d0, d1) -> (d0) (%i0, %i1) %a11 = affine.apply (d0, d1) -> (d1) (%i0, %i1) %v0 = affine.load %m[%a10, %a11] : memref<10x10xf32> - // expected-remark@-1 {{dependence from 1 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 1 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 1 to 0 at depth 3 = false}} - // expected-remark@-4 {{dependence from 1 to 1 at depth 1 = false}} - // expected-remark@-5 {{dependence from 1 to 1 at depth 2 = false}} - // expected-remark@-6 {{dependence from 1 to 1 at depth 3 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 3 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 3 = false}} } } return @@ -434,21 +434,21 @@ func @perfectly_nested_loops_loop_carried_at_depth1() { %a00 = affine.apply (d0, d1) -> (d0) (%i0, %i1) %a01 = affine.apply (d0, d1) -> (d1) (%i0, %i1) affine.store %c7, %m[%a00, %a01] : memref<10x10xf32> - // expected-remark@-1 {{dependence from 0 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 0 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 0 to 0 at depth 3 = false}} - // expected-remark@-4 {{dependence from 0 to 1 at depth 1 = [2, 2][0, 0]}} - // expected-remark@-5 {{dependence from 0 to 1 at depth 2 = false}} - // expected-remark@-6 {{dependence from 0 to 1 at depth 3 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 3 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 1 = [2, 2][0, 0]}} + // expected-remark@above {{dependence from 0 to 1 at depth 2 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 3 = false}} %a10 = affine.apply (d0, d1) -> (d0 - 2) (%i0, %i1) %a11 = affine.apply (d0, d1) -> (d1) (%i0, %i1) %v0 = affine.load %m[%a10, %a11] : memref<10x10xf32> - // expected-remark@-1 {{dependence from 1 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 1 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 1 to 0 at depth 3 = false}} - // expected-remark@-4 {{dependence from 1 to 1 at depth 1 = false}} - // expected-remark@-5 {{dependence from 1 to 1 at depth 2 = false}} - // expected-remark@-6 {{dependence from 1 to 1 at depth 3 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 3 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 3 = false}} } } return @@ -465,21 +465,21 @@ func @perfectly_nested_loops_loop_carried_at_depth2() { %a00 = affine.apply (d0, d1) -> (d0) (%i0, %i1) %a01 = affine.apply (d0, d1) -> (d1) (%i0, %i1) affine.store %c7, %m[%a00, %a01] : memref<10x10xf32> - // expected-remark@-1 {{dependence from 0 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 0 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 0 to 0 at depth 3 = false}} - // expected-remark@-4 {{dependence from 0 to 1 at depth 1 = false}} - // expected-remark@-5 {{dependence from 0 to 1 at depth 2 = [0, 0][3, 3]}} - // expected-remark@-6 {{dependence from 0 to 1 at depth 3 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 3 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 2 = [0, 0][3, 3]}} + // expected-remark@above {{dependence from 0 to 1 at depth 3 = false}} %a10 = affine.apply (d0, d1) -> (d0) (%i0, %i1) %a11 = affine.apply (d0, d1) -> (d1 - 3) (%i0, %i1) %v0 = affine.load %m[%a10, %a11] : memref<10x10xf32> - // expected-remark@-1 {{dependence from 1 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 1 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 1 to 0 at depth 3 = false}} - // expected-remark@-4 {{dependence from 1 to 1 at depth 1 = false}} - // expected-remark@-5 {{dependence from 1 to 1 at depth 2 = false}} - // expected-remark@-6 {{dependence from 1 to 1 at depth 3 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 3 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 3 = false}} } } return @@ -496,21 +496,21 @@ func @one_common_loop() { %a00 = affine.apply (d0, d1) -> (d0) (%i0, %i1) %a01 = affine.apply (d0, d1) -> (d1) (%i0, %i1) affine.store %c7, %m[%a00, %a01] : memref<10x10xf32> - // expected-remark@-1 {{dependence from 0 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 0 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 0 to 0 at depth 3 = false}} - // expected-remark@-4 {{dependence from 0 to 1 at depth 1 = false}} - // expected-remark@-5 {{dependence from 0 to 1 at depth 2 = true}} + // expected-remark@above {{dependence from 0 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 3 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 2 = true}} } affine.for %i2 = 0 to 9 { %a10 = affine.apply (d0, d1) -> (d0) (%i0, %i2) %a11 = affine.apply (d0, d1) -> (d1) (%i0, %i2) %v0 = affine.load %m[%a10, %a11] : memref<10x10xf32> - // expected-remark@-1 {{dependence from 1 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 1 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 1 to 1 at depth 1 = false}} - // expected-remark@-4 {{dependence from 1 to 1 at depth 2 = false}} - // expected-remark@-5 {{dependence from 1 to 1 at depth 3 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 3 = false}} } } return @@ -528,44 +528,44 @@ func @dependence_cycle() { affine.for %i0 = 0 to 9 { %a0 = affine.apply (d0) -> (d0) (%i0) %v0 = affine.load %m.a[%a0] : memref<100xf32> - // expected-remark@-1 {{dependence from 0 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 0 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 0 to 1 at depth 1 = false}} - // expected-remark@-4 {{dependence from 0 to 1 at depth 2 = false}} - // expected-remark@-5 {{dependence from 0 to 2 at depth 1 = false}} - // expected-remark@-6 {{dependence from 0 to 2 at depth 2 = false}} - // expected-remark@-7 {{dependence from 0 to 3 at depth 1 = false}} - // expected-remark@-8 {{dependence from 0 to 3 at depth 2 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 2 = false}} + // expected-remark@above {{dependence from 0 to 2 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 2 at depth 2 = false}} + // expected-remark@above {{dependence from 0 to 3 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 3 at depth 2 = false}} %a1 = affine.apply (d0) -> (d0) (%i0) affine.store %v0, %m.b[%a1] : memref<100xf32> - // expected-remark@-1 {{dependence from 1 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 1 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 1 to 1 at depth 1 = false}} - // expected-remark@-4 {{dependence from 1 to 1 at depth 2 = false}} - // expected-remark@-5 {{dependence from 1 to 2 at depth 1 = false}} - // expected-remark@-6 {{dependence from 1 to 2 at depth 2 = true}} - // expected-remark@-7 {{dependence from 1 to 3 at depth 1 = false}} - // expected-remark@-8 {{dependence from 1 to 3 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 2 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 2 at depth 2 = true}} + // expected-remark@above {{dependence from 1 to 3 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 3 at depth 2 = false}} %a2 = affine.apply (d0) -> (d0) (%i0) %v1 = affine.load %m.b[%a2] : memref<100xf32> - // expected-remark@-1 {{dependence from 2 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 2 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 2 to 1 at depth 1 = false}} - // expected-remark@-4 {{dependence from 2 to 1 at depth 2 = false}} - // expected-remark@-5 {{dependence from 2 to 2 at depth 1 = false}} - // expected-remark@-6 {{dependence from 2 to 2 at depth 2 = false}} - // expected-remark@-7 {{dependence from 2 to 3 at depth 1 = false}} - // expected-remark@-8 {{dependence from 2 to 3 at depth 2 = false}} + // expected-remark@above {{dependence from 2 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 2 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 2 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 2 to 1 at depth 2 = false}} + // expected-remark@above {{dependence from 2 to 2 at depth 1 = false}} + // expected-remark@above {{dependence from 2 to 2 at depth 2 = false}} + // expected-remark@above {{dependence from 2 to 3 at depth 1 = false}} + // expected-remark@above {{dependence from 2 to 3 at depth 2 = false}} %a3 = affine.apply (d0) -> (d0 + 1) (%i0) affine.store %v1, %m.a[%a3] : memref<100xf32> - // expected-remark@-1 {{dependence from 3 to 0 at depth 1 = [1, 1]}} - // expected-remark@-2 {{dependence from 3 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 3 to 1 at depth 1 = false}} - // expected-remark@-4 {{dependence from 3 to 1 at depth 2 = false}} - // expected-remark@-5 {{dependence from 3 to 2 at depth 1 = false}} - // expected-remark@-6 {{dependence from 3 to 2 at depth 2 = false}} - // expected-remark@-7 {{dependence from 3 to 3 at depth 1 = false}} - // expected-remark@-8 {{dependence from 3 to 3 at depth 2 = false}} + // expected-remark@above {{dependence from 3 to 0 at depth 1 = [1, 1]}} + // expected-remark@above {{dependence from 3 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 3 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 3 to 1 at depth 2 = false}} + // expected-remark@above {{dependence from 3 to 2 at depth 1 = false}} + // expected-remark@above {{dependence from 3 to 2 at depth 2 = false}} + // expected-remark@above {{dependence from 3 to 3 at depth 1 = false}} + // expected-remark@above {{dependence from 3 to 3 at depth 2 = false}} } return } @@ -580,21 +580,21 @@ func @negative_and_positive_direction_vectors(%arg0: index, %arg1: index) { %a00 = affine.apply (d0, d1) -> (d0 - 1) (%i0, %i1) %a01 = affine.apply (d0, d1) -> (d1 + 1) (%i0, %i1) %v0 = affine.load %m[%a00, %a01] : memref<10x10xf32> - // expected-remark@-1 {{dependence from 0 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 0 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 0 to 0 at depth 3 = false}} - // expected-remark@-4 {{dependence from 0 to 1 at depth 1 = false}} - // expected-remark@-5 {{dependence from 0 to 1 at depth 2 = false}} - // expected-remark@-6 {{dependence from 0 to 1 at depth 3 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 3 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 2 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 3 = false}} %a10 = affine.apply (d0, d1) -> (d0) (%i0, %i1) %a11 = affine.apply (d0, d1) -> (d1) (%i0, %i1) affine.store %c7, %m[%a10, %a11] : memref<10x10xf32> - // expected-remark@-1 {{dependence from 1 to 0 at depth 1 = [1, 1][-1, -1]}} - // expected-remark@-2 {{dependence from 1 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 1 to 0 at depth 3 = false}} - // expected-remark@-4 {{dependence from 1 to 1 at depth 1 = false}} - // expected-remark@-5 {{dependence from 1 to 1 at depth 2 = false}} - // expected-remark@-6 {{dependence from 1 to 1 at depth 3 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 1 = [1, 1][-1, -1]}} + // expected-remark@above {{dependence from 1 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 3 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 3 = false}} } } return @@ -609,20 +609,20 @@ func @war_raw_waw_deps() { affine.for %i1 = 0 to 10 { %a0 = affine.apply (d0) -> (d0 + 1) (%i1) %v0 = affine.load %m[%a0] : memref<100xf32> - // expected-remark@-1 {{dependence from 0 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 0 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 0 to 0 at depth 3 = false}} - // expected-remark@-4 {{dependence from 0 to 1 at depth 1 = [1, 9][1, 1]}} - // expected-remark@-5 {{dependence from 0 to 1 at depth 2 = [0, 0][1, 1]}} - // expected-remark@-6 {{dependence from 0 to 1 at depth 3 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 3 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 1 = [1, 9][1, 1]}} + // expected-remark@above {{dependence from 0 to 1 at depth 2 = [0, 0][1, 1]}} + // expected-remark@above {{dependence from 0 to 1 at depth 3 = false}} %a1 = affine.apply (d0) -> (d0) (%i1) affine.store %c7, %m[%a1] : memref<100xf32> - // expected-remark@-1 {{dependence from 1 to 0 at depth 1 = [1, 9][-1, -1]}} - // expected-remark@-2 {{dependence from 1 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 1 to 0 at depth 3 = false}} - // expected-remark@-4 {{dependence from 1 to 1 at depth 1 = [1, 9][0, 0]}} - // expected-remark@-5 {{dependence from 1 to 1 at depth 2 = false}} - // expected-remark@-6 {{dependence from 1 to 1 at depth 3 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 1 = [1, 9][-1, -1]}} + // expected-remark@above {{dependence from 1 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 3 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 1 = [1, 9][0, 0]}} + // expected-remark@above {{dependence from 1 to 1 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 3 = false}} } } return @@ -638,16 +638,16 @@ func @mod_deps() { // Results are conservative here since we currently don't have a way to // represent strided sets in FlatAffineConstraints. %v0 = affine.load %m[%a0] : memref<100xf32> - // expected-remark@-1 {{dependence from 0 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 0 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 0 to 1 at depth 1 = [1, 9]}} - // expected-remark@-4 {{dependence from 0 to 1 at depth 2 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 1 = [1, 9]}} + // expected-remark@above {{dependence from 0 to 1 at depth 2 = false}} %a1 = affine.apply (d0) -> ( (d0 + 1) mod 2) (%i0) affine.store %c7, %m[%a1] : memref<100xf32> - // expected-remark@-1 {{dependence from 1 to 0 at depth 1 = [1, 9]}} - // expected-remark@-2 {{dependence from 1 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 1 to 1 at depth 1 = [2, 9]}} - // expected-remark@-4 {{dependence from 1 to 1 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 1 = [1, 9]}} + // expected-remark@above {{dependence from 1 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 1 = [2, 9]}} + // expected-remark@above {{dependence from 1 to 1 at depth 2 = false}} } return } @@ -661,10 +661,10 @@ func @loop_nest_depth() { affine.for %i0 = 0 to 128 { affine.for %i1 = 0 to 8 { affine.store %c7, %0[%i0, %i1] : memref<100x100xf32> - // expected-remark@-1 {{dependence from 0 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 0 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 0 to 0 at depth 3 = false}} - // expected-remark@-4 {{dependence from 0 to 1 at depth 1 = true}} + // expected-remark@above {{dependence from 0 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 3 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 1 = true}} } } affine.for %i2 = 0 to 8 { @@ -673,12 +673,12 @@ func @loop_nest_depth() { affine.for %i5 = 0 to 16 { %8 = affine.apply (d0, d1) -> (d0 * 16 + d1)(%i4, %i5) %9 = affine.load %0[%8, %i3] : memref<100x100xf32> - // expected-remark@-1 {{dependence from 1 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 1 to 1 at depth 1 = false}} - // expected-remark@-3 {{dependence from 1 to 1 at depth 2 = false}} - // expected-remark@-4 {{dependence from 1 to 1 at depth 3 = false}} - // expected-remark@-5 {{dependence from 1 to 1 at depth 4 = false}} - // expected-remark@-6 {{dependence from 1 to 1 at depth 5 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 3 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 4 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 5 = false}} } } } @@ -700,10 +700,10 @@ func @mod_div_3d() { %idx1 = affine.apply (d0, d1, d2) -> (d1 mod 2) (%i0, %i1, %i2) %idx2 = affine.apply (d0, d1, d2) -> (d2 floordiv 4) (%i0, %i1, %i2) affine.store %c0, %M[%idx0, %idx1, %idx2] : memref<2 x 2 x 2 x i32> - // expected-remark@-1 {{dependence from 0 to 0 at depth 1 = [1, 3][-7, 7][-3, 3]}} - // expected-remark@-2 {{dependence from 0 to 0 at depth 2 = [0, 0][2, 7][-3, 3]}} - // expected-remark@-3 {{dependence from 0 to 0 at depth 3 = [0, 0][0, 0][1, 3]}} - // expected-remark@-4 {{dependence from 0 to 0 at depth 4 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 1 = [1, 3][-7, 7][-3, 3]}} + // expected-remark@above {{dependence from 0 to 0 at depth 2 = [0, 0][2, 7][-3, 3]}} + // expected-remark@above {{dependence from 0 to 0 at depth 3 = [0, 0][0, 0][1, 3]}} + // expected-remark@above {{dependence from 0 to 0 at depth 4 = false}} } } } @@ -726,15 +726,15 @@ func @delinearize_mod_floordiv() { affine.for %i4 = 0 to 16 { affine.for %i5 = 0 to 1 { affine.store %val, %in[%i0, %i1, %i2, %i3, %i4, %i5] : memref<2x2x3x3x16x1xi32> -// expected-remark@-1 {{dependence from 0 to 0 at depth 1 = false}} -// expected-remark@-2 {{dependence from 0 to 0 at depth 2 = false}} -// expected-remark@-3 {{dependence from 0 to 0 at depth 3 = false}} -// expected-remark@-4 {{dependence from 0 to 0 at depth 4 = false}} -// expected-remark@-5 {{dependence from 0 to 0 at depth 5 = false}} -// expected-remark@-6 {{dependence from 0 to 0 at depth 6 = false}} -// expected-remark@-7 {{dependence from 0 to 0 at depth 7 = false}} -// expected-remark@-8 {{dependence from 0 to 1 at depth 1 = true}} -// expected-remark@-9 {{dependence from 0 to 2 at depth 1 = false}} +// expected-remark@above {{dependence from 0 to 0 at depth 1 = false}} +// expected-remark@above {{dependence from 0 to 0 at depth 2 = false}} +// expected-remark@above {{dependence from 0 to 0 at depth 3 = false}} +// expected-remark@above {{dependence from 0 to 0 at depth 4 = false}} +// expected-remark@above {{dependence from 0 to 0 at depth 5 = false}} +// expected-remark@above {{dependence from 0 to 0 at depth 6 = false}} +// expected-remark@above {{dependence from 0 to 0 at depth 7 = false}} +// expected-remark@above {{dependence from 0 to 1 at depth 1 = true}} +// expected-remark@above {{dependence from 0 to 2 at depth 1 = false}} } } } @@ -759,23 +759,23 @@ func @delinearize_mod_floordiv() { ((((((d0 mod 294912) mod 147456) mod 1152) mod 384) mod 128) floordiv 128) (%a0) %v0 = affine.load %in[%a10, %a11, %a13, %a14, %a12, %a15] : memref<2x2x3x3x16x1xi32> -// expected-remark@-1 {{dependence from 1 to 0 at depth 1 = false}} -// expected-remark@-2 {{dependence from 1 to 1 at depth 1 = false}} -// expected-remark@-3 {{dependence from 1 to 1 at depth 2 = false}} -// expected-remark@-4 {{dependence from 1 to 1 at depth 3 = false}} -// expected-remark@-5 {{dependence from 1 to 2 at depth 1 = false}} -// expected-remark@-6 {{dependence from 1 to 2 at depth 2 = false}} -// expected-remark@-7 {{dependence from 1 to 2 at depth 3 = false}} +// expected-remark@above {{dependence from 1 to 0 at depth 1 = false}} +// expected-remark@above {{dependence from 1 to 1 at depth 1 = false}} +// expected-remark@above {{dependence from 1 to 1 at depth 2 = false}} +// expected-remark@above {{dependence from 1 to 1 at depth 3 = false}} +// expected-remark@above {{dependence from 1 to 2 at depth 1 = false}} +// expected-remark@above {{dependence from 1 to 2 at depth 2 = false}} +// expected-remark@above {{dependence from 1 to 2 at depth 3 = false}} // TODO(andydavis): the dep tester shouldn't be printing out these messages // below; they are redundant. affine.store %v0, %out[%ii, %jj] : memref<64x9xi32> -// expected-remark@-1 {{dependence from 2 to 0 at depth 1 = false}} -// expected-remark@-2 {{dependence from 2 to 1 at depth 1 = false}} -// expected-remark@-3 {{dependence from 2 to 1 at depth 2 = false}} -// expected-remark@-4 {{dependence from 2 to 1 at depth 3 = false}} -// expected-remark@-5 {{dependence from 2 to 2 at depth 1 = false}} -// expected-remark@-6 {{dependence from 2 to 2 at depth 2 = false}} -// expected-remark@-7 {{dependence from 2 to 2 at depth 3 = false}} +// expected-remark@above {{dependence from 2 to 0 at depth 1 = false}} +// expected-remark@above {{dependence from 2 to 1 at depth 1 = false}} +// expected-remark@above {{dependence from 2 to 1 at depth 2 = false}} +// expected-remark@above {{dependence from 2 to 1 at depth 3 = false}} +// expected-remark@above {{dependence from 2 to 2 at depth 1 = false}} +// expected-remark@above {{dependence from 2 to 2 at depth 2 = false}} +// expected-remark@above {{dependence from 2 to 2 at depth 3 = false}} } } return @@ -792,15 +792,15 @@ func @strided_loop_with_dependence_at_depth2() { %cf0 = constant 0.0 : f32 affine.for %i0 = 0 to 8 step 2 { affine.store %cf0, %0[%i0] : memref<10xf32> - // expected-remark@-1 {{dependence from 0 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 0 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 0 to 1 at depth 1 = false}} - // expected-remark@-4 {{dependence from 0 to 1 at depth 2 = true}} + // expected-remark@above {{dependence from 0 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 2 = true}} %v0 = affine.load %0[%i0] : memref<10xf32> - // expected-remark@-1 {{dependence from 1 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 1 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 1 to 1 at depth 1 = false}} - // expected-remark@-4 {{dependence from 1 to 1 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 2 = false}} } return } @@ -815,15 +815,15 @@ func @strided_loop_with_no_dependence() { affine.for %i0 = 0 to 8 step 2 { %a0 = affine.apply (d0) -> (d0 + 1)(%i0) affine.store %cf0, %0[%a0] : memref<10xf32> - // expected-remark@-1 {{dependence from 0 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 0 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 0 to 1 at depth 1 = false}} - // expected-remark@-4 {{dependence from 0 to 1 at depth 2 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 2 = false}} %v0 = affine.load %0[%i0] : memref<10xf32> - // expected-remark@-1 {{dependence from 1 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 1 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 1 to 1 at depth 1 = false}} - // expected-remark@-4 {{dependence from 1 to 1 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 2 = false}} } return } @@ -838,15 +838,15 @@ func @strided_loop_with_loop_carried_dependence_at_depth1() { affine.for %i0 = 0 to 8 step 2 { %a0 = affine.apply (d0) -> (d0 + 4)(%i0) affine.store %cf0, %0[%a0] : memref<10xf32> - // expected-remark@-1 {{dependence from 0 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 0 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 0 to 1 at depth 1 = [4, 4]}} - // expected-remark@-4 {{dependence from 0 to 1 at depth 2 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 1 = [4, 4]}} + // expected-remark@above {{dependence from 0 to 1 at depth 2 = false}} %v0 = affine.load %0[%i0] : memref<10xf32> - // expected-remark@-1 {{dependence from 1 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 1 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 1 to 1 at depth 1 = false}} - // expected-remark@-4 {{dependence from 1 to 1 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 2 = false}} } return } @@ -862,17 +862,17 @@ func @test_dep_store_depth1_load_depth2() { affine.for %i0 = 0 to 10 { %a0 = affine.apply (d0) -> (d0 - 1)(%i0) affine.store %cst, %0[%a0] : memref<100xf32> - // expected-remark@-1 {{dependence from 0 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 0 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 0 to 1 at depth 1 = false}} - // expected-remark@-4 {{dependence from 0 to 1 at depth 2 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 2 = false}} affine.for %i1 = (d0) -> (d0)(%i0) to (d0) -> (d0 + 1)(%i0) { %1 = affine.load %0[%i1] : memref<100xf32> - // expected-remark@-1 {{dependence from 1 to 0 at depth 1 = [1, 1]}} - // expected-remark@-2 {{dependence from 1 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 1 to 1 at depth 1 = false}} - // expected-remark@-4 {{dependence from 1 to 1 at depth 2 = false}} - // expected-remark@-5 {{dependence from 1 to 1 at depth 3 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 1 = [1, 1]}} + // expected-remark@above {{dependence from 1 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 3 = false}} } } return @@ -889,18 +889,18 @@ func @test_dep_store_depth2_load_depth1() { affine.for %i0 = 0 to 10 { affine.for %i1 = (d0) -> (d0)(%i0) to (d0) -> (d0 + 1)(%i0) { affine.store %cst, %0[%i1] : memref<100xf32> - // expected-remark@-1 {{dependence from 0 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 0 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 0 to 0 at depth 3 = false}} - // expected-remark@-4 {{dependence from 0 to 1 at depth 1 = [2, 2]}} - // expected-remark@-5 {{dependence from 0 to 1 at depth 2 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 0 to 0 at depth 3 = false}} + // expected-remark@above {{dependence from 0 to 1 at depth 1 = [2, 2]}} + // expected-remark@above {{dependence from 0 to 1 at depth 2 = false}} } %a0 = affine.apply (d0) -> (d0 - 2)(%i0) %1 = affine.load %0[%a0] : memref<100xf32> - // expected-remark@-1 {{dependence from 1 to 0 at depth 1 = false}} - // expected-remark@-2 {{dependence from 1 to 0 at depth 2 = false}} - // expected-remark@-3 {{dependence from 1 to 1 at depth 1 = false}} - // expected-remark@-4 {{dependence from 1 to 1 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 0 at depth 2 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 1 = false}} + // expected-remark@above {{dependence from 1 to 1 at depth 2 = false}} } return -} \ No newline at end of file +} -- 2.7.4