[PATCH] D52377: [HIP] Support early finalization of device code for -fno-gpu-rdc

2018-10-02 Thread Yaxun Liu via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC343611: [HIP] Support early finalization of device code for -fno-gpu-rdc (authored by yaxunl, committed by ). Repository: rC Clang https://reviews.llvm.org/D52377 Files: include/clang/Basic/LangOpti

[PATCH] D52377: [HIP] Support early finalization of device code for -fno-gpu-rdc

2018-10-02 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. https://reviews.llvm.org/D52377 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commit

[PATCH] D52377: [HIP] Support early finalization of device code for -fno-gpu-rdc

2018-10-02 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 167952. yaxunl edited the summary of this revision. yaxunl added a comment. Added -f{no}-cuda-rdc as alias to -f{no}-gpu-rdc. https://reviews.llvm.org/D52377 Files: include/clang/Basic/LangOptions.def include/clang/Driver/Options.td include/clang/Drive

[PATCH] D52377: [HIP] Support early finalization of device code for -fno-gpu-rdc

2018-10-01 Thread Artem Belevich via Phabricator via cfe-commits
tra added inline comments. Comment at: include/clang/Driver/Options.td:587-589 +def fgpu_rdc : Flag<["-"], "fgpu-rdc">, Flags<[CC1Option]>, HelpText<"Generate relocatable device code, also known as separate compilation mode.">; +def fno_gpu_rdc : Flag<["-"], "fno-gpu-rdc">; -

[PATCH] D52377: [HIP] Support early finalization of device code for -fno-gpu-rdc

2018-10-01 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 167774. yaxunl retitled this revision from "[HIP] Support early finalization of device code" to "[HIP] Support early finalization of device code for -fno-gpu-rdc". yaxunl edited the summary of this revision. yaxunl added a comment. Uses -fno-gpu-rdc for early

[PATCH] D52377: [HIP] Support early finalization of device code

2018-10-01 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl added a comment. In https://reviews.llvm.org/D52377#1242547, @tra wrote: > Overall the patch look OK. I'll take a closer look on Monday. > > Which mode do you expect will be most commonly used for HIP by default? With > this patch we'll have two different ways to do similar things in HIP

[PATCH] D52377: [HIP] Support early finalization of device code

2018-09-21 Thread Artem Belevich via Phabricator via cfe-commits
tra added a comment. Overall the patch look OK. I'll take a closer look on Monday. Which mode do you expect will be most commonly used for HIP by default? With this patch we'll have two different ways to do similar things in HIP vs. CUDA. E.g. by default CUDA compiles GPU code in each TU in a co

[PATCH] D52377: [HIP] Support early finalization of device code

2018-09-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl updated this revision to Diff 166556. yaxunl added a comment. Fix comments. https://reviews.llvm.org/D52377 Files: include/clang/Driver/Options.td include/clang/Driver/Types.def lib/CodeGen/CGCUDANV.cpp lib/Driver/Driver.cpp lib/Driver/ToolChains/Clang.cpp lib/Driver/ToolChai

[PATCH] D52377: [HIP] Support early finalization of device code

2018-09-21 Thread Yaxun Liu via Phabricator via cfe-commits
yaxunl created this revision. yaxunl added a reviewer: tra. This patch introduced a driver option `--hip-early-finalize`. When enabled, clang will assume the device code in each translation unit does not call external functions except those in the device library, therefore it is possible to compil