[llvm-branch-commits] [DXIL][Analysis] Implement enough of DXILResourceAnalysis for buffers (PR #100699)

Justin Bogner via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Jul 31 12:00:26 PDT 2024


================
@@ -331,6 +336,249 @@ std::pair<uint32_t, uint32_t> ResourceInfo::getAnnotateProps() const {
   return {Word0, Word1};
 }
 
+void ResourceInfo::print(raw_ostream &OS) const {
+  OS << "  Symbol: ";
+  Symbol->printAsOperand(OS);
+  OS << "\n";
+
+  OS << "  Name: \"" << Name << "\"\n"
+     << "  Binding:\n"
+     << "    Unique ID: " << Binding.UniqueID << "\n"
+     << "    Space: " << Binding.Space << "\n"
+     << "    Lower Bound: " << Binding.LowerBound << "\n"
+     << "    Size: " << Binding.Size << "\n"
+     << "  Class: " << static_cast<unsigned>(RC) << "\n"
+     << "  Kind: " << static_cast<unsigned>(Kind) << "\n";
----------------
bogner wrote:

I've done this in the latest. Note that I put the functions to translate to names as statics in this file rather than somewhere that would be accessible to others. There's an argument that we might want to move some or all of that into DXILABI.h or something, but given that this (and the old Resource analysis its replacing) are the only places that currently use the strings this seemed like the best choice for now.

https://github.com/llvm/llvm-project/pull/100699


More information about the llvm-branch-commits mailing list