[PATCH] D120586: [Attributor] Add AAAddressSpaceInfo to deduce address spaces

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 3 10:05:10 PDT 2023


arsenm added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/AttributorAttributes.cpp:11979-11981
+    Type *NewPtrTy = PointerType::getWithSamePointeeType(
+        cast<PointerType>(getAssociatedType()), AS);
+    Instruction *CastInst = new AddrSpaceCastInst(AssociatedValue, NewPtrTy);
----------------
Doesn't consider vector of pointers 


================
Comment at: llvm/lib/Transforms/IPO/AttributorAttributes.cpp:11991
+  const std::string getAsStr() const override {
+    return "address space: " + (AssumedAddressSpace == NoAddressSpace
+                                    ? "none"
----------------
Stick to IR addrspace name?


================
Comment at: llvm/test/Transforms/Attributor/address_space_info.ll:288
+}
+
+attributes #0 = { nounwind }
----------------
test intrinsics. memcpy, memmove, memset and some target ones. Also the predicates, like llvm.amdgcn.is.shared/is.private 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120586



More information about the llvm-commits mailing list