Files
clang-p2996/mlir/test/Transforms/strip-debuginfo.mlir
River Riddle 4268e4f4b8 [mlir] Change the syntax of AffineMapAttr and IntegerSetAttr to avoid conflicts with function types.
Summary: The current syntax for AffineMapAttr and IntegerSetAttr conflict with function types, making it currently impossible to round-trip function types(and e.g. FuncOp) in the IR. This revision changes the syntax for the attributes by wrapping them in a keyword. AffineMapAttr is wrapped with `affine_map<>` and IntegerSetAttr is wrapped with `affine_set<>`.

Reviewed By: nicolasvasilache, ftynse

Differential Revision: https://reviews.llvm.org/D72429
2020-01-13 13:24:39 -08:00

23 lines
612 B
MLIR

// RUN: mlir-opt %s -mlir-print-debuginfo -strip-debuginfo | FileCheck %s
// This test verifies that debug locations are stripped.
#set0 = affine_set<(d0) : (1 == 0)>
// CHECK-LABEL: func @inline_notation
func @inline_notation() -> i32 {
// CHECK: "foo"() : () -> i32 loc(unknown)
%1 = "foo"() : () -> i32 loc("foo")
// CHECK: } loc(unknown)
affine.for %i0 = 0 to 8 {
} loc(fused["foo", "mysource.cc":10:8])
// CHECK: } loc(unknown)
%2 = constant 4 : index
affine.if #set0(%2) {
} loc(fused<"myPass">["foo", "foo2"])
// CHECK: return %0 : i32 loc(unknown)
return %1 : i32 loc("bar")
}