[PATCH] D122268: Add PointerType analysis for DirectX backend

Chris Bieneman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 25 15:15:04 PDT 2022


beanz added inline comments.


================
Comment at: llvm/lib/IR/AsmWriter.cpp:616
+  case Type::DXILPointerTyID:
+    OS << "dxil-ptr (" << Ty << ")";
+    return;
----------------
kuhar wrote:
> kuhar wrote:
> > 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?
> also this
Yea. This is an odd case. I'll add a comment. This isn't the only case where we print the type pointer's address in the dump method. It also happens for `StructType`s in some cases.


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