[PATCH] D154972: [amdgpu][lds] Fix missing markUsedByKernel calls

Jon Chesterfield via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 11 16:11:56 PDT 2023


JonChesterfield marked an inline comment as done.
JonChesterfield added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp:970
+      // codegen in noclobber-barrier
+      if (!LDSUsesInfo.indirect_access[&Func].empty())
+        markUsedByKernel(Builder, &Func, Replacement.SGV);
----------------
arsenm wrote:
> The insert-on-not-found behavior of operator[] is evil, avoid using it?
It's a `map<function*, set<globalvariable*>>` so putting a default initialised value doesn't matter much. There are a lot of calls to operator[] in this file, I think I'm convinced they should all be purged as part of adding const to places. I'll avoid introducing this one.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D154972



More information about the llvm-commits mailing list