This revision was automatically updated to reflect the committed changes.
Closed by commit rG3597f02fd5c6: [AMDGPU] Add GlobalDCE before internalization
pass (authored by yaxunl).
Herald added a project: clang.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llv
yaxunl updated this revision to Diff 337900.
yaxunl marked 2 inline comments as done.
yaxunl added a comment.
revised tests by Artem's comments.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98783/new/
https://reviews.llvm.org/D98783
Files:
clang/test/CodeGenCUDA/unused-global-var.cu
yaxunl marked 2 inline comments as done.
yaxunl added inline comments.
Comment at: clang/test/CodeGenCUDA/unused-global-var.cu:23-29
+// CHECK-NOT: @_ZL2v3
+constexpr int v3 = 1;
+
+// Check managed variables are always kept.
+
+// CHECK: @v4
+__managed__ int v4;
arsenm added inline comments.
Comment at: llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp:584
+ PM.addPass(GlobalDCEPass());
PM.addPass(InternalizePass(mustPreserveGV));
}
Should we move where the internalize pass is added instead?
C
tra accepted this revision.
tra added a comment.
This revision is now accepted and ready to land.
LGTM with a test nit.
Comment at: clang/test/CodeGenCUDA/unused-global-var.cu:23-29
+// CHECK-NOT: @_ZL2v3
+constexpr int v3 = 1;
+
+// Check managed variables are always kept.
+
+
yaxunl updated this revision to Diff 337825.
yaxunl retitled this revision from "[CUDA][HIP] Remove unused addr space casts"
to "[AMDGPU] Add GlobalDCE before internalization pass".
yaxunl edited the summary of this revision.
yaxunl added a reviewer: rampitec.
yaxunl added a comment.
Herald added