[PATCH] D122268: Add PointerType analysis for DirectX backend

Jakub Kuderski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 25 14:41:16 PDT 2022


kuhar added inline comments.


================
Comment at: llvm/lib/IR/AsmWriter.cpp:616
+  case Type::DXILPointerTyID:
+    OS << "dxil-ptr (" << Ty << ")";
+    return;
----------------
beanz wrote:
> kuhar wrote:
> > This prints `dixl-ptr (0x...)` instead of the element type. Is this intentional? Could we have a test for this?
> Yea, I did this intentionally so that the `llvm::Type` class doesn't need to preserve interfaces for typed pointers, and so that the impact of DXILPointerType outside the backend is kept at a minimum.
This is surprising to me, I'd expect types to produce the same strings across multiple runs. Could ignore the addresses altogether, use some stable ID, or add a comment explaining this choice here?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122268/new/

https://reviews.llvm.org/D122268



More information about the llvm-commits mailing list