[PATCH] D58623: [AMDGPU] Allow using integral non-type template parameters

2019-02-26 Thread Michael Liao via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC354909: [AMDGPU] Allow using integral non-type template parameters (authored by hliao, committed by ). Changed prior to commit: https://reviews.llvm.org/D58623?vs=188172&id=188416#toc Repository: rC

[PATCH] D58992: [CUDA][HIP][DebugInfo] Skip reference device function

2019-03-05 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. Herald added subscribers: cfe-commits, jdoerfert, aprantl. Herald added a project: clang. - A device functions could be used as a non-type template parameter in a global/host function template. However, we should not try to retrieve that device function and reference

[PATCH] D58992: [CUDA][HIP][DebugInfo] Skip reference device function

2019-03-06 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 189488. hliao added a comment. make the test more robust to potential metadata identifier change Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58992/new/ https://reviews.llvm.org/D58992 Files: clang/lib/CodeGe

[PATCH] D58992: [CUDA][HIP][DebugInfo] Skip reference device function

2019-03-06 Thread Michael Liao via Phabricator via cfe-commits
hliao marked an inline comment as done. hliao added inline comments. Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:1755 +} +V = V->stripPointerCasts(); } aprantl wrote: > This wasn't there before... why is this necessary? That's from the or

[PATCH] D58992: [CUDA][HIP][DebugInfo] Skip reference device function

2019-03-06 Thread Michael Liao via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL31: [CUDA][HIP][DebugInfo] Skip reference device function (authored by hliao, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://

[PATCH] D59900: [Sema] Fix a crash when nonnull checking

2019-03-27 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added reviewers: rjmccall, tra, yaxunl. Herald added subscribers: cfe-commits, kristof.beyls, javed.absar. Herald added a project: clang. - Non-null checking is triggered during prototype substitution from a template instantiation, if expressions in `decltype` c

[PATCH] D59900: [Sema] Fix a crash when nonnull checking

2019-03-28 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. just explain what's the issue is and hope that help reviewers to get this fix quick. - In `Sema::DiagnoseAlwaysNonNullPointer`, we issue warnings if a `nonnull` parameter is used in null checking. It need the function declaration to check parameter attributes. That usual

[PATCH] D59900: [Sema] Fix a crash when nonnull checking

2019-03-28 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. just search bugzilla and, fortunately, found this issue is reported 2+ years ago @ https://bugs.llvm.org/show_bug.cgi?id=30559. I will revise the test case to PR30559 and move it into test/SemaCXX/nonnull.cpp Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTI

[PATCH] D59900: [Sema] Fix a crash when nonnull checking

2019-03-28 Thread Michael Liao via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL357236: [Sema] Fix a crash when nonnull checking (authored by hliao, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.

[PATCH] D61194: [HIP] Fix visibility of `__constant__` variables.

2019-04-26 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added a reviewer: yaxunl. Herald added subscribers: cfe-commits, nhaehnle, jvesely. Herald added a project: clang. - `__constant__` variables should not be `hidden` as the linker may turn them into `LOCAL` symbols. Repository: rG LLVM Github Monorepo https:

[PATCH] D61194: [HIP] Fix visibility of `__constant__` variables.

2019-04-26 Thread Michael Liao via Phabricator via cfe-commits
hliao marked an inline comment as done. hliao added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:7851 + (isa(D) && + (D->hasAttr() || D->hasAttr())); } yaxunl wrote: > is format right? yeah, it's the format after clang-format. I

[PATCH] D61194: [HIP] Fix visibility of `__constant__` variables.

2019-04-26 Thread Michael Liao via Phabricator via cfe-commits
hliao marked an inline comment as done. hliao added inline comments. Comment at: clang/test/CodeGenCUDA/amdgpu-visibility.cu:1 +// RUN: %clang_cc1 -triple amdgcn-amd-amdhsa -fcuda-is-device -fapply-global-visibility-to-externs -fvisibility default -emit-llvm -o - %s | FileCheck

[PATCH] D61194: [HIP] Fix visibility of `__constant__` variables.

2019-04-26 Thread Michael Liao via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC359344: [HIP] Fix visibility of `__constant__` variables. (authored by hliao, committed by ). Changed prior to commit: https://reviews.llvm.org/D61194?vs=196857&id=196902#toc Repository: rC Clang CH

[PATCH] D61396: [hip] Fix ambiguity from `>>>` of CUDA.

2019-05-01 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added reviewers: tra, yaxunl. Herald added a project: clang. Herald added a subscriber: cfe-commits. - For template arguments ending with `>>>`, we should cease lookahead and treat it as type-id firstly, so that deduction could work properly. Repository: rG

[PATCH] D61396: [hip] Fix ambiguity from `>>>` of CUDA.

2019-05-01 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D61396#1486706 , @tra wrote: > LGTM, but I've added @rsmith who is way more familiar with this code. sure, no rush, let's wait for comments from @rsmith Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[PATCH] D61396: [hip] Fix ambiguity from `>>>` of CUDA.

2019-05-02 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. @rsmith do you have the chance to review this simple fix? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61396/new/ https://reviews.llvm.org/D61396 ___ cfe-commits mailing list cf

[PATCH] D61458: [hip] Relax CUDA call restriction within `decltype` context.

2019-05-02 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added reviewers: tra, rjmccall, yaxunl. Herald added a project: clang. Herald added a subscriber: cfe-commits. - Within `decltype`, expressions are only type-inspected. The restriction on CUDA calls should be relaxed. Repository: rG LLVM Github Monorepo htt

[PATCH] D61458: [hip] Relax CUDA call restriction within `decltype` context.

2019-05-02 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 197860. hliao added a comment. simplify the logic using `llvm::any_of`. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61458/new/ https://reviews.llvm.org/D61458 Files: clang/include/clang/Sema/Sema.h clang/t

[PATCH] D61458: [hip] Relax CUDA call restriction within `decltype` context.

2019-05-02 Thread Michael Liao via Phabricator via cfe-commits
hliao marked an inline comment as done. hliao added a comment. In D61458#1488523 , @tra wrote: > Perhaps we should allow this in all unevaluated contexts? > I.e. `int s = sizeof(foo(x));` should also work. good point, do we have a dedicated context for

[PATCH] D61458: [hip] Relax CUDA call restriction within `decltype` context.

2019-05-03 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D61458#1488970 , @jlebar wrote: > Here's one for you: > > __host__ float bar(); > __device__ int bar(); > __host__ __device__ auto foo() -> decltype(bar()) {} > > > What is the return type of `foo`? :) > > I don't believe t

[PATCH] D61458: [hip] Relax CUDA call restriction within `decltype` context.

2019-05-03 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D61458#1488981 , @rjmccall wrote: > In D61458#1488972 , @hfinkel wrote: > > > In D61458#1488970 , @jlebar wrote: > > > > > Here's one for you: > > >

[PATCH] D61458: [hip] Relax CUDA call restriction within `decltype` context.

2019-05-03 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D61458#1488970 , @jlebar wrote: > Here's one for you: > > __host__ float bar(); > __device__ int bar(); > __host__ __device__ auto foo() -> decltype(bar()) {} > > > What is the return type of `foo`? :) > > I don't believe t

[PATCH] D61458: [hip] Relax CUDA call restriction within `decltype` context.

2019-05-03 Thread Michael Liao via Phabricator via cfe-commits
hliao marked an inline comment as done. hliao added inline comments. Comment at: clang/include/clang/Sema/Sema.h:10407-10409 bool IsAllowedCUDACall(const FunctionDecl *Caller, const FunctionDecl *Callee) { +if (llvm::any_of(ExprEvalContexts, -

[PATCH] D61396: [hip] Fix ambiguity from `>>>` of CUDA.

2019-05-03 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61396/new/ https://reviews.llvm.org/D61396 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[PATCH] D61396: [hip] Fix ambiguity from `>>>` of CUDA.

2019-05-06 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. @rsmith Do you have the chance to review this patch? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61396/new/ https://reviews.llvm.org/D61396 ___ cfe-commits mailing list cfe-com

[PATCH] D61396: [hip] Fix ambiguity from `>>>` of CUDA.

2019-05-07 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. @rsmith Do you have the chance to review this patch? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61396/new/ https://reviews.llvm.org/D61396 ___ cfe-commits mailing list cfe-com

[PATCH] D61396: [hip] Fix ambiguity from `>>>` of CUDA.

2019-05-07 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 198529. hliao added a comment. revise following reviewer's suggestion. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61396/new/ https://reviews.llvm.org/D61396 Files: clang/lib/Parse/ParseTentative.cpp clang

[PATCH] D61396: [hip] Fix ambiguity from `>>>` of CUDA.

2019-05-07 Thread Michael Liao via Phabricator via cfe-commits
hliao marked an inline comment as done. hliao added a comment. done Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61396/new/ https://reviews.llvm.org/D61396 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D61396: [hip] Fix ambiguity from `>>>` of CUDA.

2019-05-07 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 198545. hliao added a comment. Add one unrealistic case for test purpose only. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61396/new/ https://reviews.llvm.org/D61396 Files: clang/lib/Parse/ParseTentative.cpp

[PATCH] D61396: [hip] Fix ambiguity from `>>>` of CUDA.

2019-05-07 Thread Michael Liao via Phabricator via cfe-commits
hliao marked an inline comment as done. hliao added a comment. done Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D61396/new/ https://reviews.llvm.org/D61396 ___ cfe-commits mailing list cfe-commits@lis

[PATCH] D61396: [hip] Fix ambiguity from `>>>` of CUDA.

2019-05-07 Thread Michael Liao via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL360214: [hip] Fix ambiguity from `>>>` of CUDA. (authored by hliao, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm.o

[PATCH] D58509: [CodeGen] Fix string literal address space casting.

2019-02-21 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added a reviewer: yaxunl. Herald added subscribers: cfe-commits, jvesely. Herald added a project: clang. - If a string literal is reused directly, need to add necessary address space casting if the target requires that. Repository: rG LLVM Github Monorepo h

[PATCH] D58509: [CodeGen] Fix string literal address space casting.

2019-02-21 Thread Michael Liao via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC354610: [CodeGen] Fix string literal address space casting. (authored by hliao, committed by ). Herald added a subscriber: ebevhan. Changed prior to commit: https://reviews.llvm.org/D58509?vs=187797&id=

[PATCH] D58623: [AMDGPU] Allow using integral non-type template parameters

2019-02-25 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added reviewers: kzhuravl, yaxunl. Herald added subscribers: cfe-commits, jdoerfert, t-tye, tpr, dstuttard, nhaehnle, wdng, jvesely. Herald added a project: clang. - Allow using integral non-type template parameters in the following attributes __attribute__((

[PATCH] D58623: [AMDGPU] Allow using integral non-type template parameters

2019-02-25 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. non-type template parameter is used in these attributes in one of major workload. In addition, it also revises the constexpr support by allowing lvalue. The diagnostic message is refined too by pointing out which parameter violates the requirement of constant integer. Pre

[PATCH] D58627: [git] Add top-level .gitignore

2019-02-25 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added reviewers: kzhuravl, yaxunl. hliao added a project: clang. Herald added subscribers: llvm-commits, hiraditya. Herald added a project: LLVM. [D56411 ] Temp solution fixing CUDA template issue - template with overloadable ke

[PATCH] D58627: [git] Add top-level .gitignore

2019-02-25 Thread Michael Liao via Phabricator via cfe-commits
hliao abandoned this revision. hliao added a comment. by mistake, Ctrl-C is not fast enough to stop it. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D58627/new/ https://reviews.llvm.org/D58627 ___ cfe-

[PATCH] D62971: [HIP] Remove the assertion on match between host/device names.

2019-06-06 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added a reviewer: yaxunl. Herald added a project: clang. Herald added a subscriber: cfe-commits. - Under different ABIs, it's obvious that assertion is too strong. Even under the same ABI, once there are unnamed type not required to follow ODR rule, host- and d

[PATCH] D62971: [HIP] Remove the assertion on match between host/device names.

2019-06-06 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. a little explanation of the test case and what's issue is. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62971/new/ https://reviews.llvm.org/D62971 ___ cfe-commits mailing list c

[PATCH] D62971: [HIP] Remove the assertion on match between host/device names.

2019-06-06 Thread Michael Liao via Phabricator via cfe-commits
hliao marked 2 inline comments as done. hliao added inline comments. Comment at: clang/test/CodeGenCUDA/unnamed-types.cu:5 + +// CHECK: @0 = private unnamed_addr constant [40 x i8] c"_Z2k0IZZ2f1PfENK3$_0clES0_EUlfE_EvS0_T_\00" + device-side mangled name, notice

[PATCH] D62971: [HIP] Remove the assertion on match between host/device names.

2019-06-06 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. I took this back. I fab a case where anonymous type IDs mismatch between the device-side name between host-compilation and device-compilation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62971/new/ https://reviews.llvm.org

[PATCH] D63020: [HIP] Fix visibility for 'extern' device variables.

2019-06-07 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added a reviewer: yaxunl. Herald added subscribers: cfe-commits, nhaehnle, jvesely. Herald added a project: clang. - Fix a bug which misses the change for a variable to be set with target-specific attributes. Repository: rG LLVM Github Monorepo https://revi

[PATCH] D62244: [AMDGPU] Enable the implicit arguments for HIP (CLANG)

2019-06-10 Thread Michael Liao via Phabricator via cfe-commits
hliao added inline comments. Comment at: test/CodeGenCUDA/amdgpu-hip-implicit-kernarg.cu:7 + +// CHECK-DAG: attributes #0 = { noinline nounwind optnone "amdgpu-implicitarg-num-bytes"="48" For a single check, you don't need CHECK-DAG. CHANGES SINCE LAST ACTION

[PATCH] D63143: [HIP] Enforce ODR rule for lambda in HIP/CUDA.

2019-06-11 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D63143 Files: clang/include/clang/Basic/LangOptions.def clang/include/clang/Driver/CC1Options.td clang/include/clang/Sema/Sema.

[PATCH] D63143: [HIP] Enforce ODR rule for lambda in HIP/CUDA.

2019-06-11 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 204152. hliao added a comment. Add the comment for the motivation of this patch as well as reviewers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63143/new/ https://reviews.llvm.org/D63143 Files: clang/inclu

[PATCH] D63164: [HIP] Add option to force lambda nameing following ODR in HIP/CUDA.

2019-06-11 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added reviewers: tra, yaxunl. Herald added a project: clang. Herald added a subscriber: cfe-commits. - Clang follows its own scheme for lambdas which don't need to follow ODR rule. That scheme will assign an unqiue ID within the TU scope and won't be unique or

[PATCH] D63164: [HIP] Add option to force lambda nameing following ODR in HIP/CUDA.

2019-06-11 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D63164#1538968 , @tra wrote: > So, in short, what you're saying is that lambda type may leak into the > mangled name of a `__global__` function and ne need to ensure that the > mangled name is identical for both host and device,

[PATCH] D63164: [HIP] Add option to force lambda nameing following ODR in HIP/CUDA.

2019-06-12 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. ping for comment as one of HIP-based workload is blocked by this issue Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63164/new/ https://reviews.llvm.org/D63164 ___ cfe-commits ma

[PATCH] D63164: [HIP] Add option to force lambda nameing following ODR in HIP/CUDA.

2019-06-13 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D63164#1542361 , @rsmith wrote: > I think this is the wrong way to handle this issue. We need to give lambdas a > mangling if they occur in functions for which there can be definitions in > multiple translation units. In regular

[PATCH] D63164: [HIP] Add option to force lambda nameing following ODR in HIP/CUDA.

2019-06-14 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. PING Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63164/new/ https://reviews.llvm.org/D63164 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[PATCH] D63335: [HIP] Change kernel stub name again

2019-06-14 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added reviewers: yaxunl, tra. Herald added a project: clang. Herald added a subscriber: cfe-commits. - Prefix kernel stub with `__device_stub__` to avoid potential symbol name conflicts in debugger. - Revise the interface to derive the stub name and simplify the

[PATCH] D63335: [HIP] Change kernel stub name again

2019-06-14 Thread Michael Liao via Phabricator via cfe-commits
hliao marked an inline comment as done. hliao added a comment. it's requested from debugger people. they don't want to the host-side stub could match the device-side kernel function name. the previous scheme cannot prevent that. Comment at: clang/lib/CodeGen/CGCUDANV.cpp:222-

[PATCH] D63335: [HIP] Change kernel stub name again

2019-06-14 Thread Michael Liao via Phabricator via cfe-commits
hliao marked an inline comment as done. hliao added inline comments. Comment at: clang/lib/CodeGen/CGCUDANV.cpp:222-226 + assert((CGF.CGM.getContext().getAuxTargetInfo() && + (CGF.CGM.getContext().getAuxTargetInfo()->getCXXABI() != + CGF.CGM.getContext().getTa

[PATCH] D63335: [HIP] Change kernel stub name again

2019-06-14 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D63335#1543854 , @tra wrote: > In D63335#1543845 , @hliao wrote: > > > it's requested from debugger people. they don't want to the host-side stub > > could match the device-side kernel fun

[PATCH] D63335: [HIP] Change kernel stub name again

2019-06-14 Thread Michael Liao via Phabricator via cfe-commits
hliao marked an inline comment as done. hliao added inline comments. Comment at: clang/lib/CodeGen/CGCUDANV.cpp:789 +return Name; + return std::move(("__device_stub__" + Name).str()); +} tra wrote: > I suspect `return "__device_stub__" + Name;` would do. Str

[PATCH] D63335: [HIP] Change kernel stub name again

2019-06-14 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D63335#1543854 , @tra wrote: > In D63335#1543845 , @hliao wrote: > > > it's requested from debugger people. they don't want to the host-side stub > > could match the device-side kernel fun

[PATCH] D63335: [HIP] Change kernel stub name again

2019-06-14 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D63335#1543854 , @tra wrote: > In D63335#1543845 , @hliao wrote: > > > it's requested from debugger people. they don't want to the host-side stub > > could match the device-side kernel fun

[PATCH] D63335: [HIP] Change kernel stub name again

2019-06-14 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D63335#1544311 , @tra wrote: > In D63335#1544019 , @hliao wrote: > > > In D63335#1543854 , @tra wrote: > > > > > In D63335#1543845

[PATCH] D63335: [HIP] Change kernel stub name again

2019-06-14 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D63335#1544320 , @tra wrote: > In D63335#1544315 , @hliao wrote: > > > > Sorry, I still don't think I understand the reasons for this change. The > > > stub and the kernel do have a differ

[PATCH] D63335: [HIP] Change kernel stub name again

2019-06-14 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 204856. hliao added a comment. Just revise the interface for device kernel stubbing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63335/new/ https://reviews.llvm.org/D63335 Files: clang/lib/CodeGen/CGCUDANV.c

[PATCH] D63335: [HIP] Add the interface deriving the stub name of device kernels.

2019-06-14 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D63335#1544428 , @tra wrote: > In D63335#1544324 , @hliao wrote: > > > > I think debugger does have sufficient information to deal with this and > > > that would be the right place to deal

[PATCH] D63335: [HIP] Add the interface deriving the stub name of device kernels.

2019-06-17 Thread Michael Liao via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL363553: [HIP] Add the interface deriving the stub name of device kernels. (authored by hliao, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit

[PATCH] D63164: [HIP] Add option to force lambda nameing following ODR in HIP/CUDA.

2019-06-17 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. ping again. not sure my explanation gives more details on why this patch is created. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63164/new/ https://reviews.llvm.org/D63164 ___

[PATCH] D62603: [CUDA][HIP] Skip setting `externally_initialized` for static device variables.

2019-05-29 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added a reviewer: yaxunl. Herald added a project: clang. Herald added a subscriber: cfe-commits. - By declaring device variables as `static`, we assume they won't be addressable from the host side. Thus, no `externally_initialized` is required. Repository: r

[PATCH] D62603: [CUDA][HIP] Skip setting `externally_initialized` for static device variables.

2019-05-29 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. thanks, but that `static __device__` variable won't have shadow in host anymore. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62603/new/ https://reviews.llvm.org/D62603 ___ cfe-

[PATCH] D62603: [CUDA][HIP] Skip setting `externally_initialized` for static device variables.

2019-05-29 Thread Michael Liao via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rC361994: [CUDA][HIP] Skip setting `externally_initialized` for static device variables. (authored by hliao, committed by ). Changed prior to commit: https://reviews.llvm.org/D62603?vs=201938&id=201975#to

[PATCH] D62603: [CUDA][HIP] Skip setting `externally_initialized` for static device variables.

2019-05-29 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D62603#1521503 , @tra wrote: > In D62603#1521484 , @hliao wrote: > > > thanks, but that `static __device__` variable won't have shadow in host > > anymore. > > > Why not? Your change only

[PATCH] D62603: [CUDA][HIP] Skip setting `externally_initialized` for static device variables.

2019-05-29 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D62603#1521503 , @tra wrote: > In D62603#1521484 , @hliao wrote: > > > thanks, but that `static __device__` variable won't have shadow in host > > anymore. > > > Why not? Your change only

[PATCH] D62603: [CUDA][HIP] Skip setting `externally_initialized` for static device variables.

2019-05-29 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D62603#1521788 , @tra wrote: > >> NVCC also allows that: https://godbolt.org/z/t78RvM > > > > BTW, that code posted looks quite weird to me, how the code could make > > sense by return a pointer of device variable? or a pointer

[PATCH] D62603: [CUDA][HIP] Skip setting `externally_initialized` for static device variables.

2019-05-29 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D62603#1521832 , @tra wrote: > In D62603#1521792 , @hliao wrote: > > > that should assume that variable is not declared with `static`. that's also > > the motivation of this patch. > > > c

[PATCH] D67730: [CUDA][HIP] Fix typo in `BestViableFunction`

2019-09-18 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added a reviewer: tra. Herald added a project: clang. Herald added a subscriber: cfe-commits. - Should consider viable ones only when checking SameSide candidates. - Replace erasing with clearing viable flag to reduce data moving/copying. - Add one and revise ano

[PATCH] D67730: [CUDA][HIP] Fix typo in `BestViableFunction`

2019-09-19 Thread Michael Liao via Phabricator via cfe-commits
hliao marked 3 inline comments as done. hliao added a comment. r372318 with test case revised following suggestion. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67730/new/ https://reviews.llvm.org/D67730

[PATCH] D67730: [CUDA][HIP] Fix typo in `BestViableFunction`

2019-09-19 Thread Michael Liao via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL372318: [CUDA][HIP] Fix typo in `BestViableFunction` (authored by hliao, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.l

[PATCH] D67924: [Sema] Fix the atomic expr rebuilding order.

2019-09-23 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. The current BuildAtomicExpr expects the arguments to be in the API order instead of the AST order. If RebuildAtomicExpr uses the same BuildAtomicExpr, it needs to ensure the order of arguments are in API order; otherwise, arguments (especially the one with memory order) w

[PATCH] D67924: [Sema] Fix the atomic expr rebuilding order.

2019-09-23 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added a reviewer: erichkeane. Herald added subscribers: cfe-commits, jfb. Herald added a project: clang. hliao added a comment. The current BuildAtomicExpr expects the arguments to be in the API order instead of the AST order. If RebuildAtomicExpr uses the same

[PATCH] D67924: [Sema] Fix the atomic expr rebuilding order.

2019-09-23 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D67924#1679409 , @erichkeane wrote: > Yikes, good catch! > > Would we be better off instead to just modify how the other switch loads the > value? Presumably something like, "if (NeedsRearrangeArgs) > SubExprs.append(Args.begin

[PATCH] D67924: [Sema] Fix the atomic expr rebuilding order.

2019-09-23 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 221365. hliao added a comment. Add parameter name for that default argument. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67924/new/ https://reviews.llvm.org/D67924 Files: clang/include/clang/Sema/Sema.h cl

[PATCH] D67924: [Sema] Fix the atomic expr rebuilding order.

2019-09-23 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 221369. hliao added a comment. revised Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67924/new/ https://reviews.llvm.org/D67924 Files: clang/include/clang/Sema/Sema.h clang/lib/Sema/SemaChecking.cpp clang/

[PATCH] D67924: [Sema] Fix the atomic expr rebuilding order.

2019-09-23 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 221374. hliao added a comment. add test case for compare_exchange. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67924/new/ https://reviews.llvm.org/D67924 Files: clang/include/clang/Sema/Sema.h clang/lib/Se

[PATCH] D67924: [Sema] Fix the atomic expr rebuilding order.

2019-09-23 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 221375. hliao added a comment. update Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D67924/new/ https://reviews.llvm.org/D67924 Files: clang/include/clang/Sema/Sema.h clang/lib/Sema/SemaChecking.cpp clang/l

[PATCH] D67924: [Sema] Fix the atomic expr rebuilding order.

2019-09-23 Thread Michael Liao via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL372640: [Sema] Fix the atomic expr rebuilding order. (authored by hliao, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.l

[PATCH] D68030: [CUDA][HIP] Initial kernel return type relaxing.

2019-09-25 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. hliao abandoned this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D68030 Files: clang/lib/Sema/SemaDeclAttr.cpp clang/lib/Sema/SemaExpr.cpp clang/lib/Sema/SemaStm

[PATCH] D68031: [CUDA][HIP] Enable kernel function return type deduction.

2019-09-25 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added reviewers: tra, jlebar. Herald added a project: clang. Herald added a subscriber: cfe-commits. - Even though only `void` is still accepted as the deduced return type, enabling deduction/instantiation on the return type allows more consistent coding. Rep

[PATCH] D68031: [CUDA][HIP] Enable kernel function return type deduction.

2019-09-25 Thread Michael Liao via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG24337db61666: [CUDA][HIP] Enable kernel function return type deduction. (authored by hliao). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68031/new/ https:

[PATCH] D68031: [CUDA][HIP] Enable kernel function return type deduction.

2019-09-25 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D68031#1682822 , @tra wrote: > Nice. I'd mention in the commit message that NVCC does not support deduced > return type for kernel functions. Just tried with NVCC from CUDA 10, except auto-based deduced type is not supported,

[PATCH] D68157: [X86][ABI] Keep empty class argument passing by value compatible with GCC.

2019-09-27 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added a reviewer: craig.topper. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D68157 Files: clang/lib/CodeGen/TargetInfo.cpp clang/test/CodeGen/empty-class.cpp Index:

[PATCH] D68157: [X86][ABI] Keep empty class argument passing by value compatible with GCC.

2019-09-30 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. ping for review Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68157/new/ https://reviews.llvm.org/D68157 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[PATCH] D68157: [X86][ABI] Keep empty class argument passing by value compatible with GCC.

2019-10-01 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. PING Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68157/new/ https://reviews.llvm.org/D68157 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-b

[PATCH] D68300: [HIP] Add option -fno-link-builtin-bitcode to disable linking device lib

2019-10-03 Thread Michael Liao via Phabricator via cfe-commits
hliao added inline comments. Comment at: include/clang/Driver/Options.td:606 +def flink_builtin_bitcode : Flag<["-"], "flink-builtin-bitcode">, + Flags<[CC1Option]>, HelpText<"Link builtin bitcode for HIP device compilation.">; +def fno_link_builtin_bitcode : Flag<["-"], "fno-l

[PATCH] D68394: [HIP] Enable specifying different default gpu arch for HIP/CUDA.

2019-10-03 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added reviewers: tra, yaxunl. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D68394 Files: clang/lib/Driver/Driver.cpp clang/test/Driver/hip-default-gpu-arch.hip Index:

[PATCH] D68394: [HIP] Enable specifying different default gpu arch for HIP/CUDA.

2019-10-03 Thread Michael Liao via Phabricator via cfe-commits
hliao marked an inline comment as done. hliao added inline comments. Comment at: clang/lib/Driver/Driver.cpp:2655 +: CudaActionBuilderBase(C, Args, Inputs, Action::OFK_HIP) { + DefaultCudaArch = CudaArch::GFX600; +} Sam, could you let me know whi

[PATCH] D68394: [HIP] Enable specifying different default gpu arch for HIP/CUDA.

2019-10-03 Thread Michael Liao via Phabricator via cfe-commits
hliao marked an inline comment as done. hliao added inline comments. Comment at: clang/lib/Driver/Driver.cpp:2538 +: CudaActionBuilderBase(C, Args, Inputs, Action::OFK_Cuda) { + DefaultCudaArch = CudaArch::SM_20; +} tra wrote: > This technically

[PATCH] D68394: [HIP] Enable specifying different default gpu arch for HIP/CUDA.

2019-10-03 Thread Michael Liao via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL373634: [HIP] Enable specifying different default gpu arch for HIP/CUDA. (authored by hliao, committed by ). Herald added a project: LLVM. Herald added a subscriber: llvm-commits. Changed prior to commit:

[PATCH] D68578: [HIP] Fix device stub name

2019-10-07 Thread Michael Liao via Phabricator via cfe-commits
hliao added inline comments. Comment at: lib/CodeGen/CGCUDANV.cpp:235 CGF.CGM.getContext().getTargetInfo().getCXXABI())) || + CGF.getLangOpts().HIP || getDeviceStubName(getDeviceSideName(CGF.CurFuncDecl)) == keeping the original asse

[PATCH] D68587: [hip] Assume host-only compilation if the final phase is ahead of `backend`.

2019-10-07 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added reviewers: tra, yaxunl. Herald added a project: clang. Herald added a subscriber: cfe-commits. - There are several scenarios where the compilation needs stopping before `backend`, such as `-E`, `-fsyntax-ony`, and even more if developers want to diagnose

[PATCH] D68587: [hip] Assume host-only compilation if the final phase is ahead of `backend`.

2019-10-07 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D68587#1698055 , @tra wrote: > I'm fine with this for -E/-M, > > I would argue that with `-fsyntax-only` we want to know whether our source > code, which is common for all sub-compilations, has syntactic errors. > The way we co

[PATCH] D68587: [hip] Assume host-only compilation if the final phase is ahead of `backend`.

2019-10-07 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D68587#1698247 , @tra wrote: > In D68587#1698102 , @hliao wrote: > > > for most compilation tools, single input and single output are expected. > > Without assuming `-fsyntax-only` alone i

[PATCH] D68652: [driver][hip] Skip bundler if host action is nothing.

2019-10-08 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added reviewers: sfantao, tra, yaxunl. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D68652 Files: clang/lib/Driver/Driver.cpp clang/test/Driver/hip-syntax-only.hip In

[PATCH] D68652: [driver][hip] Skip bundler if host action is nothing.

2019-10-08 Thread Michael Liao via Phabricator via cfe-commits
hliao marked an inline comment as done. hliao added inline comments. Comment at: clang/test/Driver/hip-syntax-only.hip:7 + +// CHECK-DAG: clang{{.*}}" "-cc1" {{.*}} "-fcuda-is-device" +// CHECK-DAG: clang{{.*}}" "-cc1" "-triple" "x86_64" tra wrote: > I'd include

[PATCH] D68652: [driver][hip] Skip bundler if host action is nothing.

2019-10-08 Thread Michael Liao via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6334a59454ef: [driver][hip] Skip bundler if host action is nothing. (authored by hliao). Changed prior to commit: https://reviews.llvm.org/D68652?vs=223890&id=223905#toc Repository: rG LLVM Github Mo

  1   2   3   4   5   6   >