[PATCH] D138711: AMDGPU: Remove BufferPseudoSourceValue

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 29 12:55:32 PST 2022


arsenm added a comment.

In D138711#3956392 <https://reviews.llvm.org/D138711#3956392>, @nhaehnle wrote:

> In D138711#3954893 <https://reviews.llvm.org/D138711#3954893>, @arsenm wrote:
>
>> I was planning on tracking an underlying IR reference wrapped in these. That would require moving PSVs into some kind of dynamically allocatable set owned by the MachineFunction (which I have most of a patch to do somewhere)
>
> Okay. Maybe we can do that once that work actually gets done? As-is, it's just confusing. And at least for some use cases of these we should just use pointers in IR (like the "`addrspace(7)` for buffers" discussion).

I think the hard part I got stuck on was doing anything meaningful in AA without actual IR pointer values



================
Comment at: llvm/include/llvm/CodeGen/TargetLowering.h:1052-1054
+    // Fallback address space for use if ptrVal is nullptr. None means unknown
+    // address space.
+    Optional<unsigned> fallbackAddressSpace;
----------------
foad wrote:
> nhaehnle wrote:
> > foad wrote:
> > > "None means unknown address space" is a noble idea but I don't think it's providing any benefit in practice, since you only use this to initialize MachinePointerInfo, which has no concept of "unknown address space" - it just defaults to address space 0.
> > How strongly do you feel about that? :)
> Not very, but if you want to keep it then I think we need a TODO comment where you map "unknown address space" (in IntrinsicInfo) to "address space 0" (in MachinePointerInfo).
Might as well make this a plain unsigned address space. If you really want something that breaks hard, ~0u is always invalid


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D138711



More information about the llvm-commits mailing list