2022-01-05 18:32:01 +08:00
|
|
|
# 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
|
2020-09-29 21:19:54 +08:00
|
|
|
# REQUIRES: debug-info
|
|
|
|
# REQUIRES: mlir
|
|
|
|
|
|
|
|
break main
|
|
|
|
run
|
2022-01-05 18:32:01 +08:00
|
|
|
set print pretty on
|
2020-09-29 21:19:54 +08:00
|
|
|
|
2022-01-05 18:32:01 +08:00
|
|
|
# CHECK-LABEL: +print Identifier
|
|
|
|
print Identifier
|
2020-09-29 21:19:54 +08:00
|
|
|
# CHECK: "foo"
|
|
|
|
|
2022-01-05 18:32:01 +08:00
|
|
|
# CHECK-LABEL: +print OperationName
|
|
|
|
print OperationName
|
2020-09-29 21:19:54 +08:00
|
|
|
# CHECK: "FooOp"
|
|
|
|
|
2022-01-05 18:32:01 +08:00
|
|
|
# CHECK-LABEL: +print Type
|
|
|
|
print Type
|
2020-09-29 21:19:54 +08:00
|
|
|
# CHECK: impl = 0x0
|
|
|
|
|
2022-01-05 18:32:01 +08:00
|
|
|
# CHECK-LABEL: +print IndexType
|
|
|
|
print IndexType
|
2022-01-08 05:44:41 +08:00
|
|
|
# CHECK: typeID = mlir::TypeID::get<mlir::IndexType>()
|
2020-09-29 21:19:54 +08:00
|
|
|
|
2022-01-05 18:32:01 +08:00
|
|
|
# CHECK-LABEL: +print IntegerType
|
|
|
|
print IntegerType
|
2022-01-08 05:44:41 +08:00
|
|
|
# CHECK: typeID = mlir::TypeID::get<mlir::IntegerType>()
|
|
|
|
# CHECK: members of mlir::detail::IntegerTypeStorage
|
2020-09-29 21:19:54 +08:00
|
|
|
|
2022-01-05 18:32:01 +08:00
|
|
|
# CHECK-LABEL: +print FloatType
|
|
|
|
print FloatType
|
2022-01-08 05:44:41 +08:00
|
|
|
# CHECK: typeID = mlir::TypeID::get<mlir::Float32Type>()
|
2020-09-29 21:19:54 +08:00
|
|
|
|
2022-01-05 18:32:01 +08:00
|
|
|
# CHECK-LABEL: +print MemRefType
|
|
|
|
print MemRefType
|
2022-01-08 05:44:41 +08:00
|
|
|
# CHECK: typeID = mlir::TypeID::get<mlir::MemRefType>()
|
|
|
|
# CHECK: members of mlir::detail::MemRefTypeStorage
|
2020-09-29 21:19:54 +08:00
|
|
|
|
2022-01-05 18:32:01 +08:00
|
|
|
# CHECK-LABEL: +print UnrankedMemRefType
|
|
|
|
print UnrankedMemRefType
|
2022-01-08 05:44:41 +08:00
|
|
|
# CHECK: typeID = mlir::TypeID::get<mlir::UnrankedMemRefType>()
|
|
|
|
# CHECK: members of mlir::detail::UnrankedMemRefTypeStorage
|
2022-01-05 18:32:01 +08:00
|
|
|
|
|
|
|
# CHECK-LABEL: +print VectorType
|
|
|
|
print VectorType
|
2022-01-08 05:44:41 +08:00
|
|
|
# CHECK: typeID = mlir::TypeID::get<mlir::VectorType>()
|
|
|
|
# CHECK: members of mlir::detail::VectorTypeStorage
|
2022-01-05 18:32:01 +08:00
|
|
|
|
|
|
|
# CHECK-LABEL: +print TupleType
|
|
|
|
print TupleType
|
2022-01-08 05:44:41 +08:00
|
|
|
# CHECK: typeID = mlir::TypeID::get<mlir::TupleType>()
|
2020-09-29 21:19:54 +08:00
|
|
|
# CHECK: elements[0]
|
2022-01-08 05:44:41 +08:00
|
|
|
# CHECK-NEXT: typeID = mlir::TypeID::get<mlir::IndexType>()
|
2020-09-29 21:19:54 +08:00
|
|
|
# CHECK: elements[1]
|
2022-01-08 05:44:41 +08:00
|
|
|
# CHECK-NEXT: typeID = mlir::TypeID::get<mlir::Float32Type>()
|
2020-09-29 21:19:54 +08:00
|
|
|
|
2022-01-05 18:32:01 +08:00
|
|
|
# CHECK-LABEL: +print Result
|
|
|
|
print Result
|
2022-01-08 05:44:41 +08:00
|
|
|
# CHECK: typeID = mlir::TypeID::get<mlir::Float32Type>()
|
2022-01-05 18:32:01 +08:00
|
|
|
# CHECK: outOfLineIndex = 42
|
|
|
|
|
|
|
|
# CHECK-LABEL: +print Value
|
|
|
|
print Value
|
2022-01-08 05:44:41 +08:00
|
|
|
# CHECK: typeID = mlir::TypeID::get<mlir::Float32Type>()
|
|
|
|
# CHECK: mlir::detail::ValueImpl::Kind::OutOfLineOpResult
|
2020-09-29 21:19:54 +08:00
|
|
|
|
2022-01-05 18:32:01 +08:00
|
|
|
# CHECK-LABEL: +print UnknownLoc
|
|
|
|
print UnknownLoc
|
2022-01-08 05:44:41 +08:00
|
|
|
# CHECK: typeID = mlir::TypeID::get<mlir::UnknownLoc>()
|
2022-01-05 18:32:01 +08:00
|
|
|
|
|
|
|
# CHECK-LABEL: +print FileLineColLoc
|
|
|
|
print FileLineColLoc
|
2022-01-08 05:44:41 +08:00
|
|
|
# CHECK: typeID = mlir::TypeID::get<mlir::FileLineColLoc>()
|
|
|
|
# CHECK: members of mlir::detail::FileLineColLocAttrStorage
|
2022-01-05 18:32:01 +08:00
|
|
|
# CHECK: "file"
|
2020-09-29 21:19:54 +08:00
|
|
|
# CHECK: line = 7
|
|
|
|
# CHECK: column = 8
|
|
|
|
|
2022-01-05 18:32:01 +08:00
|
|
|
# CHECK-LABEL: +print OpaqueLoc
|
|
|
|
print OpaqueLoc
|
2022-01-08 05:44:41 +08:00
|
|
|
# CHECK: typeID = mlir::TypeID::get<mlir::OpaqueLoc>()
|
|
|
|
# CHECK: members of mlir::detail::OpaqueLocAttrStorage
|
2020-09-29 21:19:54 +08:00
|
|
|
# CHECK: underlyingLocation = 9
|
|
|
|
|
2022-01-05 18:32:01 +08:00
|
|
|
# CHECK-LABEL: +print NameLoc
|
|
|
|
print NameLoc
|
2022-01-08 05:44:41 +08:00
|
|
|
# CHECK: typeID = mlir::TypeID::get<mlir::NameLoc>()
|
|
|
|
# CHECK: members of mlir::detail::NameLocAttrStorage
|
2022-01-05 18:32:01 +08:00
|
|
|
# CHECK: "foo"
|
2022-01-08 05:44:41 +08:00
|
|
|
# CHECK: typeID = mlir::TypeID::get<mlir::UnknownLoc>()
|
2020-09-29 21:19:54 +08:00
|
|
|
|
2022-01-05 18:32:01 +08:00
|
|
|
# CHECK-LABEL: +print CallSiteLoc
|
|
|
|
print CallSiteLoc
|
2022-01-08 05:44:41 +08:00
|
|
|
# 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>()
|
2020-09-29 21:19:54 +08:00
|
|
|
|
2022-01-05 18:32:01 +08:00
|
|
|
# CHECK-LABEL: +print FusedLoc
|
|
|
|
print FusedLoc
|
2022-01-08 05:44:41 +08:00
|
|
|
# CHECK: typeID = mlir::TypeID::get<mlir::FusedLoc>()
|
|
|
|
# CHECK: members of mlir::detail::FusedLocAttrStorage
|
2022-01-05 18:32:01 +08:00
|
|
|
# CHECK: locations = llvm::ArrayRef of length 2
|
2022-01-08 05:44:41 +08:00
|
|
|
# CHECK: typeID = mlir::TypeID::get<mlir::FileLineColLoc>()
|
|
|
|
# CHECK: typeID = mlir::TypeID::get<mlir::NameLoc>()
|
2020-09-29 21:19:54 +08:00
|
|
|
|
2022-01-05 18:32:01 +08:00
|
|
|
# CHECK-LABEL: +print UnitAttr
|
|
|
|
print UnitAttr
|
2022-01-08 05:44:41 +08:00
|
|
|
# CHECK: typeID = mlir::TypeID::get<mlir::UnitAttr>()
|
2020-09-29 21:19:54 +08:00
|
|
|
|
2022-01-05 18:32:01 +08:00
|
|
|
# CHECK-LABEL: +print FloatAttr
|
|
|
|
print FloatAttr
|
2022-01-08 05:44:41 +08:00
|
|
|
# CHECK: typeID = mlir::TypeID::get<mlir::FloatAttr>()
|
|
|
|
# CHECK: members of mlir::detail::FloatAttrStorage
|
2020-09-29 21:19:54 +08:00
|
|
|
|
2022-01-05 18:32:01 +08:00
|
|
|
# CHECK-LABEL: +print IntegerAttr
|
|
|
|
print IntegerAttr
|
2022-01-08 05:44:41 +08:00
|
|
|
# CHECK: typeID = mlir::TypeID::get<mlir::IntegerAttr>()
|
|
|
|
# CHECK: members of mlir::detail::IntegerAttrStorage
|
2020-09-29 21:19:54 +08:00
|
|
|
|
2022-01-05 18:32:01 +08:00
|
|
|
# CHECK-LABEL: +print TypeAttr
|
|
|
|
print TypeAttr
|
2022-01-08 05:44:41 +08:00
|
|
|
# CHECK: typeID = mlir::TypeID::get<mlir::TypeAttr>()
|
|
|
|
# CHECK: members of mlir::detail::TypeAttrStorage
|
|
|
|
# CHECK: typeID = mlir::TypeID::get<mlir::IndexType>()
|
2020-09-29 21:19:54 +08:00
|
|
|
|
2022-01-05 18:32:01 +08:00
|
|
|
# CHECK-LABEL: +print ArrayAttr
|
|
|
|
print ArrayAttr
|
2022-01-08 05:44:41 +08:00
|
|
|
# CHECK: typeID = mlir::TypeID::get<mlir::ArrayAttr>()
|
|
|
|
# CHECK: members of mlir::detail::ArrayAttrStorage
|
2020-09-29 21:19:54 +08:00
|
|
|
# CHECK: llvm::ArrayRef of length 1
|
2022-01-08 05:44:41 +08:00
|
|
|
# CHECK: typeID = mlir::TypeID::get<mlir::UnitAttr>()
|
2020-09-29 21:19:54 +08:00
|
|
|
|
2022-01-05 18:32:01 +08:00
|
|
|
# CHECK-LABEL: +print StringAttr
|
|
|
|
print StringAttr
|
2022-01-08 05:44:41 +08:00
|
|
|
# CHECK: typeID = mlir::TypeID::get<mlir::StringAttr>()
|
|
|
|
# CHECK: members of mlir::detail::StringAttrStorage
|
2020-09-29 21:19:54 +08:00
|
|
|
# CHECK: value = "foo"
|
|
|
|
|
2022-01-05 18:32:01 +08:00
|
|
|
# CHECK-LABEL: +print ElementsAttr
|
|
|
|
print ElementsAttr
|
2022-01-08 05:44:41 +08:00
|
|
|
# CHECK: typeID = mlir::TypeID::get<mlir::DenseIntOrFPElementsAttr>()
|
|
|
|
# CHECK: members of mlir::detail::DenseIntOrFPElementsAttrStorage
|