148 lines · plain
1# RUN: gdb -q -batch -n \2# RUN: -iex 'source %mlir_src_root/utils/gdb-scripts/prettyprinters.py' \3# RUN: -iex 'source %llvm_src_root/utils/gdb-scripts/prettyprinters.py' \4# RUN: -ex 'source -v %s' %llvm_tools_dir/check-gdb-mlir-support \5# RUN: | FileCheck %s6# REQUIRES: debug-info7# REQUIRES: mlir8 9break main10run11set print pretty on12 13# CHECK-LABEL: +print Identifier14print Identifier15# CHECK: "foo"16 17# CHECK-LABEL: +print OperationName18print OperationName19# CHECK: "FooOp"20 21# CHECK-LABEL: +print Type22print Type23# CHECK: impl = 0x024 25# CHECK-LABEL: +print IndexType26print IndexType27# CHECK: typeID = mlir::TypeID::get<mlir::IndexType>()28 29# CHECK-LABEL: +print IntegerType30print IntegerType31# CHECK: typeID = mlir::TypeID::get<mlir::IntegerType>()32# CHECK: members of mlir::detail::IntegerTypeStorage33 34# CHECK-LABEL: +print FloatType35print FloatType36# CHECK: typeID = mlir::TypeID::get<mlir::Float32Type>()37 38# CHECK-LABEL: +print MemRefType39print MemRefType40# CHECK: typeID = mlir::TypeID::get<mlir::MemRefType>()41# CHECK: members of mlir::detail::MemRefTypeStorage42 43# CHECK-LABEL: +print UnrankedMemRefType44print UnrankedMemRefType45# CHECK: typeID = mlir::TypeID::get<mlir::UnrankedMemRefType>()46# CHECK: members of mlir::detail::UnrankedMemRefTypeStorage47 48# CHECK-LABEL: +print VectorType49print VectorType50# CHECK: typeID = mlir::TypeID::get<mlir::VectorType>()51# CHECK: members of mlir::detail::VectorTypeStorage52 53# CHECK-LABEL: +print TupleType54print TupleType55# CHECK: typeID = mlir::TypeID::get<mlir::TupleType>()56# CHECK: elements[0]57# CHECK-NEXT: typeID = mlir::TypeID::get<mlir::IndexType>()58# CHECK: elements[1]59# CHECK-NEXT: typeID = mlir::TypeID::get<mlir::Float32Type>()60 61# CHECK-LABEL: +print Result62print Result63# CHECK: typeID = mlir::TypeID::get<mlir::Float32Type>()64# CHECK: outOfLineIndex = 4265 66# CHECK-LABEL: +print Value67print Value68# CHECK: typeID = mlir::TypeID::get<mlir::Float32Type>()69# CHECK: mlir::detail::ValueImpl::Kind::OutOfLineOpResult70 71# CHECK-LABEL: +print UnknownLoc72print UnknownLoc73# CHECK: typeID = mlir::TypeID::get<mlir::UnknownLoc>()74 75# CHECK-LABEL: +print FileLineColLoc76print FileLineColLoc77# CHECK: typeID = mlir::TypeID::get<mlir::FileLineColLoc>()78# CHECK: members of mlir::detail::FileLineColLocAttrStorage79# CHECK: "file"80# CHECK: line = 781# CHECK: column = 882 83# CHECK-LABEL: +print OpaqueLoc84print OpaqueLoc85# CHECK: typeID = mlir::TypeID::get<mlir::OpaqueLoc>()86# CHECK: members of mlir::detail::OpaqueLocAttrStorage87# CHECK: underlyingLocation = 988 89# CHECK-LABEL: +print NameLoc90print NameLoc91# CHECK: typeID = mlir::TypeID::get<mlir::NameLoc>()92# CHECK: members of mlir::detail::NameLocAttrStorage93# CHECK: "foo"94# CHECK: typeID = mlir::TypeID::get<mlir::UnknownLoc>()95 96# CHECK-LABEL: +print CallSiteLoc97print CallSiteLoc98# CHECK: typeID = mlir::TypeID::get<mlir::CallSiteLoc>()99# CHECK: members of mlir::detail::CallSiteLocAttrStorage100# CHECK: typeID = mlir::TypeID::get<mlir::FileLineColLoc>()101# CHECK: typeID = mlir::TypeID::get<mlir::OpaqueLoc>()102 103# CHECK-LABEL: +print FusedLoc104print FusedLoc105# CHECK: typeID = mlir::TypeID::get<mlir::FusedLoc>()106# CHECK: members of mlir::detail::FusedLocAttrStorage107# CHECK: locations = llvm::ArrayRef of length 2108# CHECK: typeID = mlir::TypeID::get<mlir::FileLineColLoc>()109# CHECK: typeID = mlir::TypeID::get<mlir::NameLoc>()110 111# CHECK-LABEL: +print UnitAttr112print UnitAttr113# CHECK: typeID = mlir::TypeID::get<mlir::UnitAttr>()114 115# CHECK-LABEL: +print FloatAttr116print FloatAttr117# CHECK: typeID = mlir::TypeID::get<mlir::FloatAttr>()118# CHECK: members of mlir::detail::FloatAttrStorage119 120# CHECK-LABEL: +print IntegerAttr121print IntegerAttr122# CHECK: typeID = mlir::TypeID::get<mlir::IntegerAttr>()123# CHECK: members of mlir::detail::IntegerAttrStorage124 125# CHECK-LABEL: +print TypeAttr126print TypeAttr127# CHECK: typeID = mlir::TypeID::get<mlir::TypeAttr>()128# CHECK: members of mlir::detail::TypeAttrStorage129# CHECK: typeID = mlir::TypeID::get<mlir::IndexType>()130 131# CHECK-LABEL: +print ArrayAttr132print ArrayAttr133# CHECK: typeID = mlir::TypeID::get<mlir::ArrayAttr>()134# CHECK: members of mlir::detail::ArrayAttrStorage135# CHECK: llvm::ArrayRef of length 1136# CHECK: typeID = mlir::TypeID::get<mlir::UnitAttr>()137 138# CHECK-LABEL: +print StringAttr139print StringAttr140# CHECK: typeID = mlir::TypeID::get<mlir::StringAttr>()141# CHECK: members of mlir::detail::StringAttrStorage142# CHECK: value = "foo"143 144# CHECK-LABEL: +print ElementsAttr145print ElementsAttr146# CHECK: typeID = mlir::TypeID::get<mlir::DenseIntOrFPElementsAttr>()147# CHECK: members of mlir::detail::DenseIntOrFPElementsAttrStorage148