[PATCH] D158463: [AMDGPU] Add IR-level pass to rewrite away address space 7

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 23 16:36:31 PDT 2023


arsenm added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp:546-547
+  bool Changed = false;
+  // The visitors will mutate GEPs and allocas, but will push loads and stores
+  // to the worklist to avoid invalidation.
+  for (Instruction &I : instructions(F)) {
----------------
don't you just need reverse iteration and/or make_early_inc_range?


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULowerBufferFatPointers.cpp:258
+  Type *remapVector(VectorType *VT) override {
+    return VT->getWithNewType(Type::getIntNTy(VT->getContext(), /*N=*/160));
+  }
----------------
Use the queried integer type from the DataLayout?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D158463



More information about the llvm-commits mailing list