[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
Wed Sep 7 06:44:06 PDT 2022
JonChesterfield created this revision.
JonChesterfield added reviewers: carlo.bertolli, gregrodgers.
Herald added subscribers: kosarev, foad, kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, nhaehnle, jvesely, kzhuravl, arsenm.
Herald added a project: All.
JonChesterfield requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.
Bug noted in D112717 <https://reviews.llvm.org/D112717> can be sidestepped with this change. Test updates TBD.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D133422
Files:
llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
Index: llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
+++ llvm/lib/Target/AMDGPU/AMDGPULowerModuleLDSPass.cpp
@@ -216,16 +216,6 @@
std::vector<GlobalVariable *> KernelUsedVariables =
AMDGPU::findLDSVariablesToLower(M, &F);
- // Replace all constant uses with instructions if they belong to the
- // current kernel. Unnecessary, removing will cause test churn.
- for (GlobalVariable *GV : KernelUsedVariables) {
- for (User *U : make_early_inc_range(GV->users())) {
- if (ConstantExpr *C = dyn_cast<ConstantExpr>(U))
- AMDGPU::replaceConstantUsesInFunction(C, &F);
- }
- GV->removeDeadConstantUsers();
- }
-
if (!KernelUsedVariables.empty()) {
std::string VarName =
(Twine("llvm.amdgcn.kernel.") + F.getName() + ".lds").str();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133422.458438.patch
Type: text/x-patch
Size: 965 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220907/af086be9/attachment.bin>
More information about the llvm-commits
mailing list