File: mlir-support.gdb

package info (click to toggle)
llvm-toolchain-18 1%3A18.1.8-18
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,908,340 kB
  • sloc: cpp: 6,667,937; ansic: 1,440,452; asm: 883,619; python: 230,549; objc: 76,880; f90: 74,238; lisp: 35,989; pascal: 16,571; sh: 10,229; perl: 7,459; ml: 5,047; awk: 3,523; makefile: 2,987; javascript: 2,149; xml: 892; fortran: 649; cs: 573
file content (147 lines) | stat: -rw-r--r-- 4,573 bytes parent folder | download | duplicates (16)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
# RUN: gdb -q -batch -n \
# RUN:   -iex 'source %mlir_src_root/utils/gdb-scripts/prettyprinters.py' \
# RUN:   -iex 'source %llvm_src_root/utils/gdb-scripts/prettyprinters.py' \
# RUN:   -ex 'source -v %s' %llvm_tools_dir/check-gdb-mlir-support \
# RUN: | FileCheck %s
# REQUIRES: debug-info
# REQUIRES: mlir

break main
run
set print pretty on

# CHECK-LABEL: +print Identifier
print Identifier
# CHECK: "foo"

# CHECK-LABEL: +print OperationName
print OperationName
# CHECK: "FooOp"

# CHECK-LABEL: +print Type
print Type
# CHECK: impl = 0x0

# CHECK-LABEL: +print IndexType
print IndexType
# CHECK: typeID = mlir::TypeID::get<mlir::IndexType>()

# CHECK-LABEL: +print IntegerType
print IntegerType
# CHECK: typeID = mlir::TypeID::get<mlir::IntegerType>()
# CHECK: members of mlir::detail::IntegerTypeStorage

# CHECK-LABEL: +print FloatType
print FloatType
# CHECK: typeID = mlir::TypeID::get<mlir::Float32Type>()

# CHECK-LABEL: +print MemRefType
print MemRefType
# CHECK: typeID = mlir::TypeID::get<mlir::MemRefType>()
# CHECK: members of mlir::detail::MemRefTypeStorage

# CHECK-LABEL: +print UnrankedMemRefType
print UnrankedMemRefType
# CHECK: typeID = mlir::TypeID::get<mlir::UnrankedMemRefType>()
# CHECK: members of mlir::detail::UnrankedMemRefTypeStorage

# CHECK-LABEL: +print VectorType
print VectorType
# CHECK: typeID = mlir::TypeID::get<mlir::VectorType>()
# CHECK: members of mlir::detail::VectorTypeStorage

# CHECK-LABEL: +print TupleType
print TupleType
# CHECK: typeID = mlir::TypeID::get<mlir::TupleType>()
# CHECK: elements[0]
# CHECK-NEXT: typeID = mlir::TypeID::get<mlir::IndexType>()
# CHECK: elements[1]
# CHECK-NEXT: typeID = mlir::TypeID::get<mlir::Float32Type>()

# CHECK-LABEL: +print Result
print Result
# CHECK: typeID = mlir::TypeID::get<mlir::Float32Type>()
# CHECK: outOfLineIndex = 42

# CHECK-LABEL: +print Value
print Value
# CHECK: typeID = mlir::TypeID::get<mlir::Float32Type>()
# CHECK: mlir::detail::ValueImpl::Kind::OutOfLineOpResult

# CHECK-LABEL: +print UnknownLoc
print UnknownLoc
# CHECK: typeID = mlir::TypeID::get<mlir::UnknownLoc>()

# CHECK-LABEL: +print FileLineColLoc
print FileLineColLoc
# CHECK: typeID = mlir::TypeID::get<mlir::FileLineColLoc>()
# CHECK: members of mlir::detail::FileLineColLocAttrStorage
# CHECK: "file"
# CHECK: line = 7
# CHECK: column = 8

# CHECK-LABEL: +print OpaqueLoc
print OpaqueLoc
# CHECK: typeID = mlir::TypeID::get<mlir::OpaqueLoc>()
# CHECK: members of mlir::detail::OpaqueLocAttrStorage
# CHECK: underlyingLocation = 9

# CHECK-LABEL: +print NameLoc
print NameLoc
# CHECK: typeID = mlir::TypeID::get<mlir::NameLoc>()
# CHECK: members of mlir::detail::NameLocAttrStorage
# CHECK: "foo"
# CHECK: typeID = mlir::TypeID::get<mlir::UnknownLoc>()

# CHECK-LABEL: +print CallSiteLoc
print CallSiteLoc
# CHECK: typeID = mlir::TypeID::get<mlir::CallSiteLoc>()
# CHECK: members of mlir::detail::CallSiteLocAttrStorage
# CHECK: typeID = mlir::TypeID::get<mlir::FileLineColLoc>()
# CHECK: typeID = mlir::TypeID::get<mlir::OpaqueLoc>()

# CHECK-LABEL: +print FusedLoc
print FusedLoc
# CHECK: typeID = mlir::TypeID::get<mlir::FusedLoc>()
# CHECK: members of mlir::detail::FusedLocAttrStorage
# CHECK: locations = llvm::ArrayRef of length 2
# CHECK: typeID = mlir::TypeID::get<mlir::FileLineColLoc>()
# CHECK: typeID = mlir::TypeID::get<mlir::NameLoc>()

# CHECK-LABEL: +print UnitAttr
print UnitAttr
# CHECK: typeID = mlir::TypeID::get<mlir::UnitAttr>()

# CHECK-LABEL: +print FloatAttr
print FloatAttr
# CHECK: typeID = mlir::TypeID::get<mlir::FloatAttr>()
# CHECK: members of mlir::detail::FloatAttrStorage

# CHECK-LABEL: +print IntegerAttr
print IntegerAttr
# CHECK: typeID = mlir::TypeID::get<mlir::IntegerAttr>()
# CHECK: members of mlir::detail::IntegerAttrStorage

# CHECK-LABEL: +print TypeAttr
print TypeAttr
# CHECK: typeID = mlir::TypeID::get<mlir::TypeAttr>()
# CHECK: members of mlir::detail::TypeAttrStorage
# CHECK: typeID = mlir::TypeID::get<mlir::IndexType>()

# CHECK-LABEL: +print ArrayAttr
print ArrayAttr
# CHECK: typeID = mlir::TypeID::get<mlir::ArrayAttr>()
# CHECK: members of mlir::detail::ArrayAttrStorage
# CHECK: llvm::ArrayRef of length 1
# CHECK: typeID = mlir::TypeID::get<mlir::UnitAttr>()

# CHECK-LABEL: +print StringAttr
print StringAttr
# CHECK: typeID = mlir::TypeID::get<mlir::StringAttr>()
# CHECK: members of mlir::detail::StringAttrStorage
# CHECK: value = "foo"

# CHECK-LABEL: +print ElementsAttr
print ElementsAttr
# CHECK: typeID = mlir::TypeID::get<mlir::DenseIntOrFPElementsAttr>()
# CHECK: members of mlir::detail::DenseIntOrFPElementsAttrStorage