[PATCH] D98783: [AMDGPU] Add GlobalDCE before internalization pass

2021-04-17 Thread Yaxun Liu via Phabricator via cfe-commits
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

[PATCH] D98783: [AMDGPU] Add GlobalDCE before internalization pass

2021-04-15 Thread Yaxun Liu via Phabricator via cfe-commits
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

[PATCH] D98783: [AMDGPU] Add GlobalDCE before internalization pass

2021-04-15 Thread Yaxun Liu via Phabricator via cfe-commits
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;

[PATCH] D98783: [AMDGPU] Add GlobalDCE before internalization pass

2021-04-15 Thread Matt Arsenault via Phabricator via cfe-commits
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

[PATCH] D98783: [AMDGPU] Add GlobalDCE before internalization pass

2021-04-15 Thread Artem Belevich via Phabricator via cfe-commits
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. + +

[PATCH] D98783: [AMDGPU] Add GlobalDCE before internalization pass

2021-04-15 Thread Yaxun Liu via Phabricator via cfe-commits
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