diff --git a/mlir/test/Dialect/LLVMIR/types-invalid.mlir b/mlir/test/Dialect/LLVMIR/types-invalid.mlir --- a/mlir/test/Dialect/LLVMIR/types-invalid.mlir +++ b/mlir/test/Dialect/LLVMIR/types-invalid.mlir @@ -1,95 +1,95 @@ // RUN: mlir-opt --allow-unregistered-dialect -split-input-file -verify-diagnostics %s func @repeated_struct_name() { - "some.op"() : () -> !llvm2.struct<"a", (ptr>)> + "some.op"() : () -> !llvm.struct<"a", (ptr>)> // expected-error @+2 {{identified type already used with a different body}} // expected-note @+1 {{existing body: (ptr>)}} - "some.op"() : () -> !llvm2.struct<"a", (i32)> + "some.op"() : () -> !llvm.struct<"a", (i32)> } // ----- func @repeated_struct_name_packed() { - "some.op"() : () -> !llvm2.struct<"a", packed (i32)> + "some.op"() : () -> !llvm.struct<"a", packed (i32)> // expected-error @+2 {{identified type already used with a different body}} // expected-note @+1 {{existing body: packed (i32)}} - "some.op"() : () -> !llvm2.struct<"a", (i32)> + "some.op"() : () -> !llvm.struct<"a", (i32)> } // ----- func @repeated_struct_opaque() { - "some.op"() : () -> !llvm2.struct<"a", opaque> + "some.op"() : () -> !llvm.struct<"a", opaque> // expected-error @+2 {{identified type already used with a different body}} // expected-note @+1 {{existing body: opaque}} - "some.op"() : () -> !llvm2.struct<"a", ()> + "some.op"() : () -> !llvm.struct<"a", ()> } // ----- func @repeated_struct_opaque_non_empty() { - "some.op"() : () -> !llvm2.struct<"a", opaque> + "some.op"() : () -> !llvm.struct<"a", opaque> // expected-error @+2 {{identified type already used with a different body}} // expected-note @+1 {{existing body: opaque}} - "some.op"() : () -> !llvm2.struct<"a", (i32, i32)> + "some.op"() : () -> !llvm.struct<"a", (i32, i32)> } // ----- func @repeated_struct_opaque_redefinition() { - "some.op"() : () -> !llvm2.struct<"a", ()> + "some.op"() : () -> !llvm.struct<"a", ()> // expected-error @+1 {{redeclaring defined struct as opaque}} - "some.op"() : () -> !llvm2.struct<"a", opaque> + "some.op"() : () -> !llvm.struct<"a", opaque> } // ----- func @struct_literal_opaque() { // expected-error @+1 {{only identified structs can be opaque}} - "some.op"() : () -> !llvm2.struct + "some.op"() : () -> !llvm.struct } // ----- func @unexpected_type() { // expected-error @+1 {{unexpected type, expected i* or keyword}} - "some.op"() : () -> !llvm2.f32 + "some.op"() : () -> !llvm.f32 } // ----- func @unexpected_type() { // expected-error @+1 {{unknown LLVM type}} - "some.op"() : () -> !llvm2.ifoo + "some.op"() : () -> !llvm.ifoo } // ----- func @explicitly_opaque_struct() { - "some.op"() : () -> !llvm2.struct<"a", opaque> + "some.op"() : () -> !llvm.struct<"a", opaque> // expected-error @+2 {{identified type already used with a different body}} // expected-note @+1 {{existing body: opaque}} - "some.op"() : () -> !llvm2.struct<"a", ()> + "some.op"() : () -> !llvm.struct<"a", ()> } // ----- func @dynamic_vector() { // expected-error @+1 {{expected '? x x ' or ' x '}} - "some.op"() : () -> !llvm2.vec + "some.op"() : () -> !llvm.vec } // ----- func @dynamic_scalable_vector() { // expected-error @+1 {{expected '? x x ' or ' x '}} - "some.op"() : () -> !llvm2.vec + "some.op"() : () -> !llvm.vec } // ----- func @unscalable_vector() { // expected-error @+1 {{expected '? x x ' or ' x '}} - "some.op"() : () -> !llvm2.vec<4 x 4 x i32> + "some.op"() : () -> !llvm.vec<4 x 4 x i32> } diff --git a/mlir/test/Target/llvmir-types.mlir b/mlir/test/Target/llvmir-types.mlir --- a/mlir/test/Target/llvmir-types.mlir +++ b/mlir/test/Target/llvmir-types.mlir @@ -3,180 +3,180 @@ llvm.func @primitives() { // CHECK: declare void @return_void() // CHECK: declare void @return_void_round() - "llvm.test_introduce_func"() { name = "return_void", type = !llvm2.void } : () -> () + "llvm.test_introduce_func"() { name = "return_void", type = !llvm.void } : () -> () // CHECK: declare half @return_half() // CHECK: declare half @return_half_round() - "llvm.test_introduce_func"() { name = "return_half", type = !llvm2.half } : () -> () + "llvm.test_introduce_func"() { name = "return_half", type = !llvm.half } : () -> () // CHECK: declare bfloat @return_bfloat() // CHECK: declare bfloat @return_bfloat_round() - "llvm.test_introduce_func"() { name = "return_bfloat", type = !llvm2.bfloat } : () -> () + "llvm.test_introduce_func"() { name = "return_bfloat", type = !llvm.bfloat } : () -> () // CHECK: declare float @return_float() // CHECK: declare float @return_float_round() - "llvm.test_introduce_func"() { name = "return_float", type = !llvm2.float } : () -> () + "llvm.test_introduce_func"() { name = "return_float", type = !llvm.float } : () -> () // CHECK: declare double @return_double() // CHECK: declare double @return_double_round() - "llvm.test_introduce_func"() { name = "return_double", type = !llvm2.double } : () -> () + "llvm.test_introduce_func"() { name = "return_double", type = !llvm.double } : () -> () // CHECK: declare fp128 @return_fp128() // CHECK: declare fp128 @return_fp128_round() - "llvm.test_introduce_func"() { name = "return_fp128", type = !llvm2.fp128 } : () -> () + "llvm.test_introduce_func"() { name = "return_fp128", type = !llvm.fp128 } : () -> () // CHECK: declare x86_fp80 @return_x86_fp80() // CHECK: declare x86_fp80 @return_x86_fp80_round() - "llvm.test_introduce_func"() { name = "return_x86_fp80", type = !llvm2.x86_fp80 } : () -> () + "llvm.test_introduce_func"() { name = "return_x86_fp80", type = !llvm.x86_fp80 } : () -> () // CHECK: declare ppc_fp128 @return_ppc_fp128() // CHECK: declare ppc_fp128 @return_ppc_fp128_round() - "llvm.test_introduce_func"() { name = "return_ppc_fp128", type = !llvm2.ppc_fp128 } : () -> () + "llvm.test_introduce_func"() { name = "return_ppc_fp128", type = !llvm.ppc_fp128 } : () -> () // CHECK: declare x86_mmx @return_x86_mmx() // CHECK: declare x86_mmx @return_x86_mmx_round() - "llvm.test_introduce_func"() { name = "return_x86_mmx", type = !llvm2.x86_mmx } : () -> () + "llvm.test_introduce_func"() { name = "return_x86_mmx", type = !llvm.x86_mmx } : () -> () llvm.return } llvm.func @funcs() { // CHECK: declare void @f_void_i32(i32) // CHECK: declare void @f_void_i32_round(i32) - "llvm.test_introduce_func"() { name ="f_void_i32", type = !llvm2.func } : () -> () + "llvm.test_introduce_func"() { name ="f_void_i32", type = !llvm.func } : () -> () // CHECK: declare i32 @f_i32_empty() // CHECK: declare i32 @f_i32_empty_round() - "llvm.test_introduce_func"() { name ="f_i32_empty", type = !llvm2.func } : () -> () + "llvm.test_introduce_func"() { name ="f_i32_empty", type = !llvm.func } : () -> () // CHECK: declare i32 @f_i32_half_bfloat_float_double(half, bfloat, float, double) // CHECK: declare i32 @f_i32_half_bfloat_float_double_round(half, bfloat, float, double) - "llvm.test_introduce_func"() { name ="f_i32_half_bfloat_float_double", type = !llvm2.func } : () -> () + "llvm.test_introduce_func"() { name ="f_i32_half_bfloat_float_double", type = !llvm.func } : () -> () // CHECK: declare i32 @f_i32_i32_i32(i32, i32) // CHECK: declare i32 @f_i32_i32_i32_round(i32, i32) - "llvm.test_introduce_func"() { name ="f_i32_i32_i32", type = !llvm2.func } : () -> () + "llvm.test_introduce_func"() { name ="f_i32_i32_i32", type = !llvm.func } : () -> () // CHECK: declare void @f_void_variadic(...) // CHECK: declare void @f_void_variadic_round(...) - "llvm.test_introduce_func"() { name ="f_void_variadic", type = !llvm2.func } : () -> () + "llvm.test_introduce_func"() { name ="f_void_variadic", type = !llvm.func } : () -> () // CHECK: declare void @f_void_i32_i32_variadic(i32, i32, ...) // CHECK: declare void @f_void_i32_i32_variadic_round(i32, i32, ...) - "llvm.test_introduce_func"() { name ="f_void_i32_i32_variadic", type = !llvm2.func } : () -> () + "llvm.test_introduce_func"() { name ="f_void_i32_i32_variadic", type = !llvm.func } : () -> () llvm.return } llvm.func @ints() { // CHECK: declare i1 @return_i1() // CHECK: declare i1 @return_i1_round() - "llvm.test_introduce_func"() { name = "return_i1", type = !llvm2.i1 } : () -> () + "llvm.test_introduce_func"() { name = "return_i1", type = !llvm.i1 } : () -> () // CHECK: declare i8 @return_i8() // CHECK: declare i8 @return_i8_round() - "llvm.test_introduce_func"() { name = "return_i8", type = !llvm2.i8 } : () -> () + "llvm.test_introduce_func"() { name = "return_i8", type = !llvm.i8 } : () -> () // CHECK: declare i16 @return_i16() // CHECK: declare i16 @return_i16_round() - "llvm.test_introduce_func"() { name = "return_i16", type = !llvm2.i16 } : () -> () + "llvm.test_introduce_func"() { name = "return_i16", type = !llvm.i16 } : () -> () // CHECK: declare i32 @return_i32() // CHECK: declare i32 @return_i32_round() - "llvm.test_introduce_func"() { name = "return_i32", type = !llvm2.i32 } : () -> () + "llvm.test_introduce_func"() { name = "return_i32", type = !llvm.i32 } : () -> () // CHECK: declare i64 @return_i64() // CHECK: declare i64 @return_i64_round() - "llvm.test_introduce_func"() { name = "return_i64", type = !llvm2.i64 } : () -> () + "llvm.test_introduce_func"() { name = "return_i64", type = !llvm.i64 } : () -> () // CHECK: declare i57 @return_i57() // CHECK: declare i57 @return_i57_round() - "llvm.test_introduce_func"() { name = "return_i57", type = !llvm2.i57 } : () -> () + "llvm.test_introduce_func"() { name = "return_i57", type = !llvm.i57 } : () -> () // CHECK: declare i129 @return_i129() // CHECK: declare i129 @return_i129_round() - "llvm.test_introduce_func"() { name = "return_i129", type = !llvm2.i129 } : () -> () + "llvm.test_introduce_func"() { name = "return_i129", type = !llvm.i129 } : () -> () llvm.return } llvm.func @pointers() { // CHECK: declare i8* @return_pi8() // CHECK: declare i8* @return_pi8_round() - "llvm.test_introduce_func"() { name = "return_pi8", type = !llvm2.ptr } : () -> () + "llvm.test_introduce_func"() { name = "return_pi8", type = !llvm.ptr } : () -> () // CHECK: declare float* @return_pfloat() // CHECK: declare float* @return_pfloat_round() - "llvm.test_introduce_func"() { name = "return_pfloat", type = !llvm2.ptr } : () -> () + "llvm.test_introduce_func"() { name = "return_pfloat", type = !llvm.ptr } : () -> () // CHECK: declare i8** @return_ppi8() // CHECK: declare i8** @return_ppi8_round() - "llvm.test_introduce_func"() { name = "return_ppi8", type = !llvm2.ptr> } : () -> () + "llvm.test_introduce_func"() { name = "return_ppi8", type = !llvm.ptr> } : () -> () // CHECK: declare i8***** @return_pppppi8() // CHECK: declare i8***** @return_pppppi8_round() - "llvm.test_introduce_func"() { name = "return_pppppi8", type = !llvm2.ptr>>>> } : () -> () + "llvm.test_introduce_func"() { name = "return_pppppi8", type = !llvm.ptr>>>> } : () -> () // CHECK: declare i8* @return_pi8_0() // CHECK: declare i8* @return_pi8_0_round() - "llvm.test_introduce_func"() { name = "return_pi8_0", type = !llvm2.ptr } : () -> () + "llvm.test_introduce_func"() { name = "return_pi8_0", type = !llvm.ptr } : () -> () // CHECK: declare i8 addrspace(1)* @return_pi8_1() // CHECK: declare i8 addrspace(1)* @return_pi8_1_round() - "llvm.test_introduce_func"() { name = "return_pi8_1", type = !llvm2.ptr } : () -> () + "llvm.test_introduce_func"() { name = "return_pi8_1", type = !llvm.ptr } : () -> () // CHECK: declare i8 addrspace(42)* @return_pi8_42() // CHECK: declare i8 addrspace(42)* @return_pi8_42_round() - "llvm.test_introduce_func"() { name = "return_pi8_42", type = !llvm2.ptr } : () -> () + "llvm.test_introduce_func"() { name = "return_pi8_42", type = !llvm.ptr } : () -> () // CHECK: declare i8 addrspace(42)* addrspace(9)* @return_ppi8_42_9() // CHECK: declare i8 addrspace(42)* addrspace(9)* @return_ppi8_42_9_round() - "llvm.test_introduce_func"() { name = "return_ppi8_42_9", type = !llvm2.ptr, 9> } : () -> () + "llvm.test_introduce_func"() { name = "return_ppi8_42_9", type = !llvm.ptr, 9> } : () -> () llvm.return } llvm.func @vectors() { // CHECK: declare <4 x i32> @return_v4_i32() // CHECK: declare <4 x i32> @return_v4_i32_round() - "llvm.test_introduce_func"() { name = "return_v4_i32", type = !llvm2.vec<4 x i32> } : () -> () + "llvm.test_introduce_func"() { name = "return_v4_i32", type = !llvm.vec<4 x i32> } : () -> () // CHECK: declare <4 x float> @return_v4_float() // CHECK: declare <4 x float> @return_v4_float_round() - "llvm.test_introduce_func"() { name = "return_v4_float", type = !llvm2.vec<4 x float> } : () -> () + "llvm.test_introduce_func"() { name = "return_v4_float", type = !llvm.vec<4 x float> } : () -> () // CHECK: declare @return_vs_4_i32() // CHECK: declare @return_vs_4_i32_round() - "llvm.test_introduce_func"() { name = "return_vs_4_i32", type = !llvm2.vec } : () -> () + "llvm.test_introduce_func"() { name = "return_vs_4_i32", type = !llvm.vec } : () -> () // CHECK: declare @return_vs_8_half() // CHECK: declare @return_vs_8_half_round() - "llvm.test_introduce_func"() { name = "return_vs_8_half", type = !llvm2.vec } : () -> () + "llvm.test_introduce_func"() { name = "return_vs_8_half", type = !llvm.vec } : () -> () // CHECK: declare <4 x i8*> @return_v_4_pi8() // CHECK: declare <4 x i8*> @return_v_4_pi8_round() - "llvm.test_introduce_func"() { name = "return_v_4_pi8", type = !llvm2.vec<4 x ptr> } : () -> () + "llvm.test_introduce_func"() { name = "return_v_4_pi8", type = !llvm.vec<4 x ptr> } : () -> () llvm.return } llvm.func @arrays() { // CHECK: declare [10 x i32] @return_a10_i32() // CHECK: declare [10 x i32] @return_a10_i32_round() - "llvm.test_introduce_func"() { name = "return_a10_i32", type = !llvm2.array<10 x i32> } : () -> () + "llvm.test_introduce_func"() { name = "return_a10_i32", type = !llvm.array<10 x i32> } : () -> () // CHECK: declare [8 x float] @return_a8_float() // CHECK: declare [8 x float] @return_a8_float_round() - "llvm.test_introduce_func"() { name = "return_a8_float", type = !llvm2.array<8 x float> } : () -> () + "llvm.test_introduce_func"() { name = "return_a8_float", type = !llvm.array<8 x float> } : () -> () // CHECK: declare [10 x i32 addrspace(4)*] @return_a10_pi32_4() // CHECK: declare [10 x i32 addrspace(4)*] @return_a10_pi32_4_round() - "llvm.test_introduce_func"() { name = "return_a10_pi32_4", type = !llvm2.array<10 x ptr> } : () -> () + "llvm.test_introduce_func"() { name = "return_a10_pi32_4", type = !llvm.array<10 x ptr> } : () -> () // CHECK: declare [10 x [4 x float]] @return_a10_a4_float() // CHECK: declare [10 x [4 x float]] @return_a10_a4_float_round() - "llvm.test_introduce_func"() { name = "return_a10_a4_float", type = !llvm2.array<10 x array<4 x float>> } : () -> () + "llvm.test_introduce_func"() { name = "return_a10_a4_float", type = !llvm.array<10 x array<4 x float>> } : () -> () llvm.return } llvm.func @literal_structs() { // CHECK: declare {} @return_struct_empty() // CHECK: declare {} @return_struct_empty_round() - "llvm.test_introduce_func"() { name = "return_struct_empty", type = !llvm2.struct<()> } : () -> () + "llvm.test_introduce_func"() { name = "return_struct_empty", type = !llvm.struct<()> } : () -> () // CHECK: declare { i32 } @return_s_i32() // CHECK: declare { i32 } @return_s_i32_round() - "llvm.test_introduce_func"() { name = "return_s_i32", type = !llvm2.struct<(i32)> } : () -> () + "llvm.test_introduce_func"() { name = "return_s_i32", type = !llvm.struct<(i32)> } : () -> () // CHECK: declare { float, i32 } @return_s_float_i32() // CHECK: declare { float, i32 } @return_s_float_i32_round() - "llvm.test_introduce_func"() { name = "return_s_float_i32", type = !llvm2.struct<(float, i32)> } : () -> () + "llvm.test_introduce_func"() { name = "return_s_float_i32", type = !llvm.struct<(float, i32)> } : () -> () // CHECK: declare { { i32 } } @return_s_s_i32() // CHECK: declare { { i32 } } @return_s_s_i32_round() - "llvm.test_introduce_func"() { name = "return_s_s_i32", type = !llvm2.struct<(struct<(i32)>)> } : () -> () + "llvm.test_introduce_func"() { name = "return_s_s_i32", type = !llvm.struct<(struct<(i32)>)> } : () -> () // CHECK: declare { i32, { i32 }, float } @return_s_i32_s_i32_float() // CHECK: declare { i32, { i32 }, float } @return_s_i32_s_i32_float_round() - "llvm.test_introduce_func"() { name = "return_s_i32_s_i32_float", type = !llvm2.struct<(i32, struct<(i32)>, float)> } : () -> () + "llvm.test_introduce_func"() { name = "return_s_i32_s_i32_float", type = !llvm.struct<(i32, struct<(i32)>, float)> } : () -> () // CHECK: declare <{}> @return_sp_empty() // CHECK: declare <{}> @return_sp_empty_round() - "llvm.test_introduce_func"() { name = "return_sp_empty", type = !llvm2.struct } : () -> () + "llvm.test_introduce_func"() { name = "return_sp_empty", type = !llvm.struct } : () -> () // CHECK: declare <{ i32 }> @return_sp_i32() // CHECK: declare <{ i32 }> @return_sp_i32_round() - "llvm.test_introduce_func"() { name = "return_sp_i32", type = !llvm2.struct } : () -> () + "llvm.test_introduce_func"() { name = "return_sp_i32", type = !llvm.struct } : () -> () // CHECK: declare <{ float, i32 }> @return_sp_float_i32() // CHECK: declare <{ float, i32 }> @return_sp_float_i32_round() - "llvm.test_introduce_func"() { name = "return_sp_float_i32", type = !llvm2.struct } : () -> () + "llvm.test_introduce_func"() { name = "return_sp_float_i32", type = !llvm.struct } : () -> () // CHECK: declare <{ i32, { i32, i1 }, float }> @return_sp_i32_s_i31_1_float() // CHECK: declare <{ i32, { i32, i1 }, float }> @return_sp_i32_s_i31_1_float_round() - "llvm.test_introduce_func"() { name = "return_sp_i32_s_i31_1_float", type = !llvm2.struct, float)> } : () -> () + "llvm.test_introduce_func"() { name = "return_sp_i32_s_i31_1_float", type = !llvm.struct, float)> } : () -> () // CHECK: declare { <{ i32 }> } @return_s_sp_i32() // CHECK: declare { <{ i32 }> } @return_s_sp_i32_round() - "llvm.test_introduce_func"() { name = "return_s_sp_i32", type = !llvm2.struct<(struct)> } : () -> () + "llvm.test_introduce_func"() { name = "return_s_sp_i32", type = !llvm.struct<(struct)> } : () -> () // CHECK: declare <{ { i32 } }> @return_sp_s_i32() // CHECK: declare <{ { i32 } }> @return_sp_s_i32_round() - "llvm.test_introduce_func"() { name = "return_sp_s_i32", type = !llvm2.struct)> } : () -> () + "llvm.test_introduce_func"() { name = "return_sp_s_i32", type = !llvm.struct)> } : () -> () llvm.return } @@ -199,30 +199,30 @@ llvm.func @identified_structs() { // CHECK: declare %empty - "llvm.test_introduce_func"() { name = "return_s_empty", type = !llvm2.struct<"empty", ()> } : () -> () + "llvm.test_introduce_func"() { name = "return_s_empty", type = !llvm.struct<"empty", ()> } : () -> () // CHECK: declare %opaque - "llvm.test_introduce_func"() { name = "return_s_opaque", type = !llvm2.struct<"opaque", opaque> } : () -> () + "llvm.test_introduce_func"() { name = "return_s_opaque", type = !llvm.struct<"opaque", opaque> } : () -> () // CHECK: declare %long - "llvm.test_introduce_func"() { name = "return_s_long", type = !llvm2.struct<"long", (i32, struct<(i32, i1)>, float, ptr>)> } : () -> () + "llvm.test_introduce_func"() { name = "return_s_long", type = !llvm.struct<"long", (i32, struct<(i32, i1)>, float, ptr>)> } : () -> () // CHECK: declare %self-recursive - "llvm.test_introduce_func"() { name = "return_s_self_recurisve", type = !llvm2.struct<"self-recursive", (ptr>)> } : () -> () + "llvm.test_introduce_func"() { name = "return_s_self_recurisve", type = !llvm.struct<"self-recursive", (ptr>)> } : () -> () // CHECK: declare %unpacked - "llvm.test_introduce_func"() { name = "return_s_unpacked", type = !llvm2.struct<"unpacked", (i32)> } : () -> () + "llvm.test_introduce_func"() { name = "return_s_unpacked", type = !llvm.struct<"unpacked", (i32)> } : () -> () // CHECK: declare %packed - "llvm.test_introduce_func"() { name = "return_s_packed", type = !llvm2.struct<"packed", packed (i32)> } : () -> () + "llvm.test_introduce_func"() { name = "return_s_packed", type = !llvm.struct<"packed", packed (i32)> } : () -> () // CHECK: declare %"name with spaces and !^$@$#" - "llvm.test_introduce_func"() { name = "return_s_symbols", type = !llvm2.struct<"name with spaces and !^$@$#", packed (i32)> } : () -> () + "llvm.test_introduce_func"() { name = "return_s_symbols", type = !llvm.struct<"name with spaces and !^$@$#", packed (i32)> } : () -> () // CHECK: declare %mutually-a - "llvm.test_introduce_func"() { name = "return_s_mutually_a", type = !llvm2.struct<"mutually-a", (ptr, 3>)>>)> } : () -> () + "llvm.test_introduce_func"() { name = "return_s_mutually_a", type = !llvm.struct<"mutually-a", (ptr, 3>)>>)> } : () -> () // CHECK: declare %mutually-b - "llvm.test_introduce_func"() { name = "return_s_mutually_b", type = !llvm2.struct<"mutually-b", (ptr>)>, 3>)> } : () -> () + "llvm.test_introduce_func"() { name = "return_s_mutually_b", type = !llvm.struct<"mutually-b", (ptr>)>, 3>)> } : () -> () // CHECK: declare %struct-of-arrays - "llvm.test_introduce_func"() { name = "return_s_struct_of_arrays", type = !llvm2.struct<"struct-of-arrays", (array<10 x i32>)> } : () -> () + "llvm.test_introduce_func"() { name = "return_s_struct_of_arrays", type = !llvm.struct<"struct-of-arrays", (array<10 x i32>)> } : () -> () // CHECK: declare [10 x %array-of-structs] - "llvm.test_introduce_func"() { name = "return_s_array_of_structs", type = !llvm2.array<10 x struct<"array-of-structs", (i32)>> } : () -> () + "llvm.test_introduce_func"() { name = "return_s_array_of_structs", type = !llvm.array<10 x struct<"array-of-structs", (i32)>> } : () -> () // CHECK: declare %ptr-to-struct* - "llvm.test_introduce_func"() { name = "return_s_ptr_to_struct", type = !llvm2.ptr> } : () -> () + "llvm.test_introduce_func"() { name = "return_s_ptr_to_struct", type = !llvm.ptr> } : () -> () llvm.return } diff --git a/mlir/test/lib/Dialect/CMakeLists.txt b/mlir/test/lib/Dialect/CMakeLists.txt --- a/mlir/test/lib/Dialect/CMakeLists.txt +++ b/mlir/test/lib/Dialect/CMakeLists.txt @@ -1,4 +1,3 @@ add_subdirectory(Affine) -add_subdirectory(LLVMIR) add_subdirectory(SPIRV) add_subdirectory(Test) diff --git a/mlir/test/lib/Dialect/LLVMIR/CMakeLists.txt b/mlir/test/lib/Dialect/LLVMIR/CMakeLists.txt deleted file mode 100644 --- a/mlir/test/lib/Dialect/LLVMIR/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ - -add_mlir_library(MLIRLLVMTypeTestDialect - LLVMTypeTestDialect.cpp - - EXCLUDE_FROM_LIBMLIR - - LINK_COMPONENTS - Core - - LINK_LIBS PUBLIC - MLIRDialect - MLIRIR - MLIRLLVMIR - ) diff --git a/mlir/test/lib/Dialect/LLVMIR/LLVMTypeTestDialect.cpp b/mlir/test/lib/Dialect/LLVMIR/LLVMTypeTestDialect.cpp deleted file mode 100644 --- a/mlir/test/lib/Dialect/LLVMIR/LLVMTypeTestDialect.cpp +++ /dev/null @@ -1,52 +0,0 @@ -#ifndef DIALECT_LLVMIR_LLVMTYPETESTDIALECT_H_ -#define DIALECT_LLVMIR_LLVMTYPETESTDIALECT_H_ - -#include "mlir/Dialect/LLVMIR/LLVMTypes.h" -#include "mlir/IR/Dialect.h" - -namespace mlir { -namespace LLVM { -namespace { -class LLVMDialectNewTypes : public Dialect { -public: - LLVMDialectNewTypes(MLIRContext *ctx) : Dialect(getDialectNamespace(), ctx) { - // clang-format off - // addTypes(); - // clang-format on - } - static StringRef getDialectNamespace() { return "llvm2"; } - - Type parseType(DialectAsmParser &parser) const override { - return detail::parseType(parser); - } - void printType(Type type, DialectAsmPrinter &printer) const override { - detail::printType(type.cast(), printer); - } -}; -} // namespace -} // namespace LLVM - -void registerLLVMTypeTestDialect() { - mlir::registerDialect(); -} -} // namespace mlir - -#endif // DIALECT_LLVMIR_LLVMTYPETESTDIALECT_H_ diff --git a/mlir/tools/mlir-opt/CMakeLists.txt b/mlir/tools/mlir-opt/CMakeLists.txt --- a/mlir/tools/mlir-opt/CMakeLists.txt +++ b/mlir/tools/mlir-opt/CMakeLists.txt @@ -13,7 +13,6 @@ if(MLIR_INCLUDE_TESTS) set(test_libs MLIRAffineTransformsTestPasses - MLIRLLVMTypeTestDialect MLIRSPIRVTestPasses MLIRTestDialect MLIRTestIR diff --git a/mlir/tools/mlir-opt/mlir-opt.cpp b/mlir/tools/mlir-opt/mlir-opt.cpp --- a/mlir/tools/mlir-opt/mlir-opt.cpp +++ b/mlir/tools/mlir-opt/mlir-opt.cpp @@ -31,7 +31,6 @@ // Defined in the test directory, no public header. void registerConvertToTargetEnvPass(); void registerInliner(); -void registerLLVMTypeTestDialect(); void registerMemRefBoundCheck(); void registerPassManagerTestPass(); void registerPatternsTestPass(); @@ -105,7 +104,6 @@ void registerTestPasses() { registerConvertToTargetEnvPass(); registerInliner(); - registerLLVMTypeTestDialect(); registerMemRefBoundCheck(); registerPassManagerTestPass(); registerPatternsTestPass(); diff --git a/mlir/tools/mlir-translate/CMakeLists.txt b/mlir/tools/mlir-translate/CMakeLists.txt --- a/mlir/tools/mlir-translate/CMakeLists.txt +++ b/mlir/tools/mlir-translate/CMakeLists.txt @@ -15,9 +15,6 @@ ${translation_libs} ${test_libs} MLIRIR - # TODO: remove after LLVM dialect transition is complete; translation uses a - # registration function defined in this library unconditionally. - MLIRLLVMTypeTestDialect MLIRParser MLIRPass MLIRSPIRV diff --git a/mlir/tools/mlir-translate/mlir-translate.cpp b/mlir/tools/mlir-translate/mlir-translate.cpp --- a/mlir/tools/mlir-translate/mlir-translate.cpp +++ b/mlir/tools/mlir-translate/mlir-translate.cpp @@ -49,7 +49,6 @@ namespace mlir { // Defined in the test directory, no public header. -void registerLLVMTypeTestDialect(); void registerTestLLVMTypeTranslation(); void registerTestRoundtripSPIRV(); void registerTestRoundtripDebugSPIRV(); @@ -63,7 +62,6 @@ int main(int argc, char **argv) { registerAllDialects(); - registerLLVMTypeTestDialect(); registerAllTranslations(); registerTestTranslations(); llvm::InitLLVM y(argc, argv);