[Mlir-commits] [mlir] f98bb41 - Add a mlir natvis file for debugging with Visual Studio

Aaron Smith llvmlistbot at llvm.org
Fri Oct 23 14:15:46 PDT 2020


Author: Kirsten Lee
Date: 2020-10-23T14:15:01-07:00
New Revision: f98bb414f58ee447481e4de19625baff22718343

URL: https://github.com/llvm/llvm-project/commit/f98bb414f58ee447481e4de19625baff22718343
DIFF: https://github.com/llvm/llvm-project/commit/f98bb414f58ee447481e4de19625baff22718343.diff

LOG: Add a mlir natvis file for debugging with Visual Studio

Differential Revision: https://reviews.llvm.org/D89601

Added: 
    mlir/utils/MLIRVisualizers/mlir.natvis

Modified: 
    

Removed: 
    


################################################################################
diff  --git a/mlir/utils/MLIRVisualizers/mlir.natvis b/mlir/utils/MLIRVisualizers/mlir.natvis
new file mode 100644
index 000000000000..49332f34aa5f
--- /dev/null
+++ b/mlir/utils/MLIRVisualizers/mlir.natvis
@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="utf-8"?>
+<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
+  <Type Name="mlir::detail::StorageUserBase<*>">
+    <!--handles mlir::Type-->
+    <DisplayString>{"$T3"}</DisplayString>
+    <Expand>
+      <ExpandedItem>($T3*)impl</ExpandedItem>
+    </Expand>
+  </Type>
+
+  <Type Name="mlir::Value">
+    <DisplayString>{ownerAndKind}</DisplayString>
+    <Expand>
+      <Item Name="OpResult" Condition=
+            "((ownerAndKind.Value >> ImplType::InfoTy::IntShift) & ImplType::InfoTy::IntMask) < mlir::Value::Kind::TrailingOpResult">
+        (Operation*)(ImplType::InfoTy::PointerBitMask & ownerAndKind.Value)
+      </Item>
+      <Item Name="TrailingOpResult" Condition=
+            "((ownerAndKind.Value >> ImplType::InfoTy::IntShift) & ImplType::InfoTy::IntMask) == mlir::Value::Kind::TrailingOpResult">
+        (detail::TrailingOpResult*)(ImplType::InfoTy::PointerBitMask & ownerAndKind.Value)
+      </Item>
+      <Item Name="BlockArgument" Condition=
+            "((ownerAndKind.Value >> ImplType::InfoTy::IntShift) & ImplType::InfoTy::IntMask) == mlir::Value::Kind::BlockArgument">
+        (detail::BlockArgumentImpl*)(ImplType::InfoTy::PointerBitMask & ownerAndKind.Value)
+      </Item>
+      <Item Name="ownerAndKind">ownerAndKind</Item>
+    </Expand>
+  </Type>
+
+  <Type Name="mlir::Location">
+    <Expand>
+      <ExpandedItem >(LocationAttr)impl</ExpandedItem>
+    </Expand>
+  </Type>
+</AutoVisualizer>
+


        


More information about the Mlir-commits mailing list