Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/llvm/llvm-project.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/flang
diff options
context:
space:
mode:
authorRiver Riddle <riddleriver@gmail.com>2022-05-12 23:36:05 +0300
committerRiver Riddle <riddleriver@gmail.com>2022-05-16 23:54:02 +0300
commita6cef03f66ca76169ba629d21f1245b50b646ee0 (patch)
tree07254aee635907f2eead90ce945d6c9d65e63d37 /flang
parentc8457eb5323ca99361c1748a22a16edb3160ae5f (diff)
[mlir] Remove the `type` keyword from type alias definitions
This was carry over from LLVM IR where the alias definition can be ambiguous, but MLIR type aliases have no such problems. Having the `type` keyword is superfluous and doesn't add anything. This commit drops it, which also nicely aligns with the syntax for attribute aliases (which doesn't have a keyword). Differential Revision: https://reviews.llvm.org/D125501
Diffstat (limited to 'flang')
-rw-r--r--flang/include/flang/Optimizer/Dialect/FIROps.td2
-rw-r--r--flang/test/Fir/affine-promotion.fir4
-rw-r--r--flang/test/Fir/array-value-copy-3.fir2
-rw-r--r--flang/test/Fir/ignore-missing-type-descriptor.fir2
-rw-r--r--flang/test/Fir/recursive-type.fir8
5 files changed, 9 insertions, 9 deletions
diff --git a/flang/include/flang/Optimizer/Dialect/FIROps.td b/flang/include/flang/Optimizer/Dialect/FIROps.td
index 2d71d136e8d2..bb652c10016e 100644
--- a/flang/include/flang/Optimizer/Dialect/FIROps.td
+++ b/flang/include/flang/Optimizer/Dialect/FIROps.td
@@ -2576,7 +2576,7 @@ def fir_GenTypeDescOp : fir_OneResultOp<"gentypedesc", [NoSideEffect]> {
is `!fir.tdesc<T>`.
```mlir
- !T = type !fir.type<T{...}>
+ !T = !fir.type<T{...}>
%t = fir.gentypedesc !T // returns value of !fir.tdesc<!T>
```
}];
diff --git a/flang/test/Fir/affine-promotion.fir b/flang/test/Fir/affine-promotion.fir
index 51eb0d05cbd8..9009cbb72398 100644
--- a/flang/test/Fir/affine-promotion.fir
+++ b/flang/test/Fir/affine-promotion.fir
@@ -2,7 +2,7 @@
// RUN: fir-opt --split-input-file --promote-to-affine --affine-loop-invariant-code-motion --cse %s | FileCheck %s
-!arr_d1 = type !fir.ref<!fir.array<?xf32>>
+!arr_d1 = !fir.ref<!fir.array<?xf32>>
#arr_len = affine_map<()[j1,k1] -> (k1 - j1 + 1)>
func.func @loop_with_load_and_store(%a1: !arr_d1, %a2: !arr_d1, %a3: !arr_d1) {
@@ -75,7 +75,7 @@ func.func @loop_with_load_and_store(%a1: !arr_d1, %a2: !arr_d1, %a3: !arr_d1) {
// -----
-!arr_d1 = type !fir.ref<!fir.array<?xf32>>
+!arr_d1 = !fir.ref<!fir.array<?xf32>>
#arr_len = affine_map<()[j1,k1] -> (k1 - j1 + 1)>
func.func @loop_with_if(%a: !arr_d1, %v: f32) {
diff --git a/flang/test/Fir/array-value-copy-3.fir b/flang/test/Fir/array-value-copy-3.fir
index fe4693b01dc4..465bdab18fa7 100644
--- a/flang/test/Fir/array-value-copy-3.fir
+++ b/flang/test/Fir/array-value-copy-3.fir
@@ -6,7 +6,7 @@
// RUN: fir-opt --array-value-copy %s | FileCheck %s
-!t_with_alloc_comp = type !fir.type<t{i:!fir.box<!fir.heap<!fir.array<?xi32>>>}>
+!t_with_alloc_comp = !fir.type<t{i:!fir.box<!fir.heap<!fir.array<?xi32>>>}>
func.func private @custom_assign(!fir.ref<!t_with_alloc_comp>, !fir.ref<!t_with_alloc_comp>)
func.func @test_overlap_with_alloc_components(%arg0: !fir.ref<!fir.array<10x!t_with_alloc_comp>>) {
%0 = fir.alloca !fir.box<!t_with_alloc_comp>
diff --git a/flang/test/Fir/ignore-missing-type-descriptor.fir b/flang/test/Fir/ignore-missing-type-descriptor.fir
index ec8204c86da3..ecd82bbb85b7 100644
--- a/flang/test/Fir/ignore-missing-type-descriptor.fir
+++ b/flang/test/Fir/ignore-missing-type-descriptor.fir
@@ -4,7 +4,7 @@
// Missing derived type descriptor pointers are replaced by null pointers.
// RUN: tco --ignore-missing-type-desc -o - %s | FileCheck %s
-!some_freestyle_type = type !fir.type<some_not_mangled_type{j:i32}>
+!some_freestyle_type = !fir.type<some_not_mangled_type{j:i32}>
func.func private @bar(!fir.box<!some_freestyle_type>)
diff --git a/flang/test/Fir/recursive-type.fir b/flang/test/Fir/recursive-type.fir
index 6c0b800540c7..3bfe29b60cc7 100644
--- a/flang/test/Fir/recursive-type.fir
+++ b/flang/test/Fir/recursive-type.fir
@@ -5,10 +5,10 @@
// RUN: fir-opt --fir-to-llvm-ir="target=i386-unknown-linux-gnu" %s | FileCheck %s
// RUN: fir-opt --fir-to-llvm-ir="target=powerpc64le-unknown-linux-gn" %s | FileCheck %s
-!t1 = type !fir.type<t1 {a1:!fir.ptr<!fir.type<t1>>}>
-!t2 = type !fir.type<t2 {b1:f32,b2:!fir.ptr<!fir.type<t2>>,b3:i32,b4:!fir.ptr<!fir.type<t2>>}>
-!t3 = type !fir.type<t3 {c1:!fir.ptr<!fir.type<t4>>}>
-!t4 = type !fir.type<t4 {d1:!fir.ptr<!fir.type<t3>>}>
+!t1 = !fir.type<t1 {a1:!fir.ptr<!fir.type<t1>>}>
+!t2 = !fir.type<t2 {b1:f32,b2:!fir.ptr<!fir.type<t2>>,b3:i32,b4:!fir.ptr<!fir.type<t2>>}>
+!t3 = !fir.type<t3 {c1:!fir.ptr<!fir.type<t4>>}>
+!t4 = !fir.type<t4 {d1:!fir.ptr<!fir.type<t3>>}>
// CHECK-LABEL: llvm.func @recursiveTypes
// CHECK-SAME: %{{.*}}: !llvm.struct<"[[T1:.*]]", (ptr<struct<"[[T1]]">>)>