[PATCH] D133422: [amdgpu] Remove unnecessary removal of constantexpr, expected to fix O0 problem

Jon Chesterfield via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 9 08:12:27 PDT 2022


JonChesterfield added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp:232
               return I && I->getFunction() == &F;
             });
         Changed = true;
----------------
Replacing the ConstantExpr with Instructions is not necessary since the replacement is itself a ConstantExpr. However, if a nexted ConstantExpr is used from multiple functions, the control flow to trace back to the corresponding instruction in a given function is awkward. It's probably better to unconditionally replace every constexpr in every instruction with more instructions, at least as far as LDS lowering is concerned.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D133422



More information about the llvm-commits mailing list