[PATCH] D105590: [amdgpu] Remove the GlobalDCE pass prior to the internalization pass.
Michael Liao via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 8 07:26:12 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rGcc92833f8a3d: [amdgpu] Remove the GlobalDCE pass prior to the internalization pass. (authored by hliao).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D105590/new/
https://reviews.llvm.org/D105590
Files:
llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
Index: llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
+++ llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp
@@ -431,6 +431,7 @@
if (const Function *F = dyn_cast<Function>(&GV))
return F->isDeclaration() || AMDGPU::isEntryFunctionCC(F->getCallingConv());
+ GV.removeDeadConstantUsers();
return !GV.use_empty();
}
@@ -595,9 +596,6 @@
PM.addPass(AMDGPUPrintfRuntimeBindingPass());
if (InternalizeSymbols) {
- // Global variables may have dead uses which need to be removed.
- // Otherwise these useless global variables will not get internalized.
- PM.addPass(GlobalDCEPass());
PM.addPass(InternalizePass(mustPreserveGV));
}
PM.addPass(AMDGPUPropagateAttributesLatePass(*this));
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105590.357220.patch
Type: text/x-patch
Size: 885 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210708/97cfdee8/attachment.bin>
More information about the llvm-commits
mailing list