[PATCH] D69322: [hip][cuda] Enable extended lambda support on Windows.

2019-10-30 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 227091. hliao added a comment. revise `MSHIPNumberingContext` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69322/new/ https://reviews.llvm.org/D69322 Files: clang/include/clang/AST/DeclCXX.h clang/include/c

[PATCH] D69322: [hip][cuda] Enable extended lambda support on Windows.

2019-10-30 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 227214. hliao marked an inline comment as done. hliao added a comment. simplify again following suggestion. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69322/new/ https://reviews.llvm.org/D69322 Files: clang

[PATCH] D69322: [hip][cuda] Enable extended lambda support on Windows.

2019-10-30 Thread Michael Liao via Phabricator via cfe-commits
hliao added inline comments. Comment at: clang/include/clang/AST/DeclCXX.h:395-400 /// The number used to indicate this lambda expression for name /// mangling in the Itanium C++ ABI. unsigned ManglingNumber : 31; +/// The device side mangling number. +un

[PATCH] D69322: [hip][cuda] Enable extended lambda support on Windows.

2019-11-01 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. kindly PING for review Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69322/new/ https://reviews.llvm.org/D69322 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://li

[PATCH] D69322: [hip][cuda] Enable extended lambda support on Windows.

2019-11-04 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. Looks like holidays are approaching, :). Anyway, it's really appreciated that you could review this patch to enable CUDA/HIP applications on Windows. Thanks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69322/new/ https://

[PATCH] D69826: [hip] Enable pointer argument lowering through coercing type.

2019-11-04 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. It happens that Sam has a similar patch of this one. After discussion, we agreed that this patch addresses more cases found in the workloads. Thank Sam for the test case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69826/n

[PATCH] D69826: [hip] Enable pointer argument lowering through coercing type.

2019-11-04 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added reviewers: tra, rjmccall, yaxunl. Herald added subscribers: cfe-commits, nhaehnle, jvesely. Herald added a project: clang. hliao added a comment. It happens that Sam has a similar patch of this one. After discussion, we agreed that this patch addresses mor

[PATCH] D69826: [hip] Enable pointer argument lowering through coercing type.

2019-11-04 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 227784. hliao added a comment. add the test case for struct. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69826/new/ https://reviews.llvm.org/D69826 Files: clang/lib/CodeGen/CGCall.cpp clang/lib/CodeGen/Tar

[PATCH] D69826: [hip] Enable pointer argument lowering through coercing type.

2019-11-04 Thread Michael Liao via Phabricator via cfe-commits
hliao marked 2 inline comments as done. hliao added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:7719 + // Arrary types. + if (auto ATy = dyn_cast(Ty)) { +auto T = ATy->getElementType(); arsenm wrote: > No tests with arrays or s

[PATCH] D69826: [hip] Enable pointer argument lowering through coercing type.

2019-11-04 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 227787. hliao added a comment. revise code following reviwers' comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69826/new/ https://reviews.llvm.org/D69826 Files: clang/lib/CodeGen/CGCall.cpp clang/lib

[PATCH] D69826: [hip] Enable pointer argument lowering through coercing type.

2019-11-04 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 227795. hliao added a comment. - revise member function name. - add the test case for by-val array types. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69826/new/ https://reviews.llvm.org/D69826 Files: clang/l

[PATCH] D69826: [hip] Enable pointer argument lowering through coercing type.

2019-11-04 Thread Michael Liao via Phabricator via cfe-commits
hliao marked 3 inline comments as done. hliao added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:7719 + // Arrary types. + if (auto ATy = dyn_cast(Ty)) { +auto T = ATy->getElementType(); hliao wrote: > hliao wrote: > > arsenm wr

[PATCH] D69826: [hip] Enable pointer argument lowering through coercing type.

2019-11-05 Thread Michael Liao via Phabricator via cfe-commits
hliao marked 2 inline comments as done. hliao added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:7689 + // Coerce HIP pointer arguments from generic pointers to global ones. + llvm::Type *coerce(llvm::Type *Ty, unsigned DefaultAS, + unsigned

[PATCH] D69826: [hip] Enable pointer argument lowering through coercing type.

2019-11-05 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 227864. hliao marked an inline comment as done. hliao added a comment. revise parameter names Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69826/new/ https://reviews.llvm.org/D69826 Files: clang/lib/CodeGen/C

[PATCH] D69826: [hip] Enable pointer argument lowering through coercing type.

2019-11-05 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 227908. hliao marked an inline comment as done. hliao added a comment. Add host-side checks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69826/new/ https://reviews.llvm.org/D69826 Files: clang/lib/CodeGen/CG

[PATCH] D69826: [hip] Enable pointer argument lowering through coercing type.

2019-11-05 Thread Michael Liao via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG15140e4bacf9: [hip] Enable pointer argument lowering through coercing type. (authored by hliao). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69826/new/ ht

[PATCH] D69826: [hip] Enable pointer argument lowering through coercing type.

2019-11-05 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D69826#1734296 , @yaxunl wrote: > I am a little bit concerned that user may have such code: > > struct A { int *p; } > __global__ kernel(A a) { > int x; > a.p = &x; > f(a); > } > > > @arsenm what happens if a pri

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

2019-11-05 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. Sam, could you review this? Even though it has no functionality issue so far, from the code sequence, once there's an `addrspacecast` is inserted, we lose the chance to set target specific attributes if any. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

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

2019-11-05 Thread Michael Liao via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG0a220de9e9ca: [HIP] Fix visibility for 'extern' device variables. (authored by hliao). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63020/new/ https://revi

[PATCH] D69322: [hip][cuda] Enable extended lambda support on Windows.

2019-11-06 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/D69322/new/ https://reviews.llvm.org/D69322 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

[PATCH] D69322: [hip][cuda] Enable extended lambda support on Windows.

2019-11-08 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/D69322/new/ https://reviews.llvm.org/D69322 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llv

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

2019-11-12 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 228924. hliao added a comment. This patch is revived with more changes addressing the previous concerns. Back to Justin's example: __host__ float bar(); __device__ int bar(); __host__ __device__ auto foo() -> decltype(bar()) { return bar(); } Even witho

[PATCH] D70729: Workaround for EvalInfo ctor for MSVC 2017

2019-11-26 Thread Michael Liao via Phabricator via cfe-commits
hliao accepted this revision. hliao added a comment. This revision is now accepted and ready to land. LGTM, anyway calling a virtual function inside the constructor is not encouraged. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70729/new/ https://reviews.llvm.org/D70729 __

[PATCH] D70981: [opencl] Fix address space deduction on array variables.

2019-12-03 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added a reviewer: Anastasia. Herald added subscribers: cfe-commits, yaxunl. Herald added a project: clang. - The deduced address space needs applying to its element type as well. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D70981 Files: c

[PATCH] D70981: [opencl] Fix address space deduction on array variables.

2019-12-04 Thread Michael Liao via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGfa9dd410a9a9: [opencl] Fix address space deduction on array variables. (authored by hliao). Changed prior to commit: https://reviews.llvm.org/D70981?vs=231970&id=232123#toc Repository: rG LLVM Github

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2019-12-09 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 232933. hliao added a comment. refine commit message Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71227/new/ https://reviews.llvm.org/D71227 Files: clang/include/clang/Sema/Sema.h clang/lib/Parse/ParseDecl.

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2019-12-09 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added reviewers: tra, jlebar, yaxunl. Herald added a project: clang. Herald added a subscriber: cfe-commits. hliao updated this revision to Diff 232933. hliao added a comment. hliao edited the summary of this revision. refine commit message - As global initiali

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2019-12-09 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 232938. hliao added a comment. refine again Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71227/new/ https://reviews.llvm.org/D71227 Files: clang/include/clang/Sema/Sema.h clang/lib/Parse/ParseDecl.cpp cla

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2019-12-10 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. File PR44266 to track that bug. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71227/new/ https://reviews.llvm.org/D71227 ___ cfe-com

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2019-12-10 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D71227#1778136 , @tra wrote: > I wonder if this patch will help with this case: > > https://godbolt.org/z/X4KdsV > > __device__ float fn(int) { return threadIdx.x; }; > __host__ float fn(float); > > float gvar1 = []()__dev

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-03-17 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 250965. hliao added a comment. Rebase to the latest trunk. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71227/new/ https://reviews.llvm.org/D71227 Files: clang/include/clang/Sema/Sema.h clang/lib/Parse/Pars

[PATCH] D76344: [hip] Revise `GlobalDecl` constructors. NFC.

2020-03-17 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. - https://reviews.llvm.org/D68578 revises the `GlobalDecl` constructors to ensure all GPU kernels have `ReferenceKenelKind` initialized properly with an explicit co

[PATCH] D76344: [hip] Revise `GlobalDecl` constructors. NFC.

2020-03-18 Thread Michael Liao via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4cf01ed75e35: [hip] Revise `GlobalDecl` constructors. NFC. (authored by hliao). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76344/new/ https://reviews.llv

[PATCH] D76365: [cuda][hip] Add CUDA builtin surface/texture reference support.

2020-03-18 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added reviewers: tra, rjmccall, yaxunl. Herald added a reviewer: a.sidorin. Herald added a project: clang. Herald added a subscriber: cfe-commits. - Even though the bindless surface/texture interfaces are promoted, there are still code using surface/texture refe

[PATCH] D76365: [cuda][hip] Add CUDA builtin surface/texture reference support.

2020-03-18 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 251101. hliao added a comment. Reformatting with clang-format. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76365/new/ https://reviews.llvm.org/D76365 Files: clang/include/clang/AST/Type.h clang/include/cla

[PATCH] D76365: [cuda][hip] Add CUDA builtin surface/texture reference support.

2020-03-18 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 251125. hliao added a comment. Fix warnings from clang-tidy. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76365/new/ https://reviews.llvm.org/D76365 Files: clang/include/clang/AST/Type.h clang/include/clang

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-03-18 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 251171. hliao added a comment. Fix warnings from clang-tidy. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71227/new/ https://reviews.llvm.org/D71227 Files: clang/include/clang/Sema/Sema.h clang/lib/Parse/Pa

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-03-18 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 251212. hliao added a comment. Fix more clang-tidy warnings. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71227/new/ https://reviews.llvm.org/D71227 Files: clang/include/clang/Sema/Sema.h clang/lib/Parse/Pa

[PATCH] D76365: [cuda][hip] Add CUDA builtin surface/texture reference support.

2020-03-18 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 251241. hliao added a comment. Revise one part of the logic to reduce condition evaluation overhead. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76365/new/ https://reviews.llvm.org/D76365 Files: clang/includ

[PATCH] D76365: [cuda][hip] Add CUDA builtin surface/texture reference support.

2020-03-19 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 251488. hliao added a comment. More refinement to compile sample code with CUDA headers. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D76365/new/ https://reviews.llvm.org/D76365 Files: clang/include/clang/AST/

[PATCH] D76365: [cuda][hip] Add CUDA builtin surface/texture reference support.

2020-03-19 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. With this revision, the following sample could be compiled with CUDA SDK and almost the same PTX code is generated. #include texture tex; #if defined(__clang__) struct v4f { float x, y, z, w; }; __device__ v4f tex_2d_ld(texture, float,

[PATCH] D76365: [cuda][hip] Add CUDA builtin surface/texture reference support.

2020-03-19 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D76365#1932392 , @tra wrote: > > Note that, clang-based one needs defining texture fetch functions as they > > could not be reused from CUDA SDK. That part is enclosed with #if > > defined(__clang__). > > What prevents clang to

[PATCH] D76365: [cuda][hip] Add CUDA builtin surface/texture reference support.

2020-03-19 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D76365#1932398 , @tra wrote: > I believe LLVM does have `nvvm.texsurf.handle` implemented: > https://github.com/llvm/llvm-project/blob/d9972f848294b06807c8764615852ba2bc1e8a74/llvm/include/llvm/IR/IntrinsicsNVVM.td#L1150 This o

[PATCH] D76365: [cuda][hip] Add CUDA builtin surface/texture reference support.

2020-03-20 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D76365#1932517 , @tra wrote: > In D76365#1932439 , @hliao wrote: > > > > > > > > > That's a magic. I could not figure out how it works. From its use, e.g. > > `tex2D` on `texture`, > > >

[PATCH] D73942: [hip] Properly populate macros based on host processor.

2020-02-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. - The device compilation needs to have a consistent source code compared to the corresponding host compilation. If macros based on the host-specific target proc

[PATCH] D73942: [hip] Properly populate macros based on host processor.

2020-02-04 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D73942#1857384 , @tra wrote: > On one hand the change makes sense to me and fits well with what we've done > so far. > On the other hand, I worry that this is likely to break things. > We sort of have been implicitly relying on

[PATCH] D73942: [hip] Properly populate macros based on host processor.

2020-02-04 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 242395. hliao added a comment. Follow the reviewer's comment and an internal option `--hip-use-aux-triple-only` to fall back the original behavior. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73942/new/ https:/

[PATCH] D73942: [hip] Properly populate macros based on host processor.

2020-02-04 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 242400. hliao added a comment. `s/--hip-use-aux-triple-only/--gpu-use-aux-triple-only/g` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73942/new/ https://reviews.llvm.org/D73942 Files: clang/include/clang/Driv

[PATCH] D73942: [hip] Properly populate macros based on host processor.

2020-02-04 Thread Michael Liao via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGccac6b2bf877: [hip] Properly populate macros based on host processor. (authored by hliao). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73942/new/ https://

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-02-04 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. @rsmith do have u the chance to review the revised change again as well as my answers to your comments? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71227/new/ https://reviews.llvm.org/D71227

[PATCH] D74020: [ARM] Clean up ARM target & feature checking in clang driver.

2020-02-04 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. Herald added subscribers: cfe-commits, kristof.beyls. Herald added a project: clang. - Similar to other targets, instead of passing a toolchain, a driver argument should be passed into `arm::getARMTargetFeatures` should take a driver argument. Aslo, that routine shou

[PATCH] D74020: [ARM] Clean up ARM target & feature checking in clang driver.

2020-02-04 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 242513. hliao added a comment. revise the commit message. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74020/new/ https://reviews.llvm.org/D74020 Files: clang/lib/Driver/ToolChains/Arch/ARM.cpp clang/lib/Dr

[PATCH] D74020: [ARM] Clean up ARM target & feature checking in clang driver.

2020-02-04 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 242516. hliao added a comment. revise formatting Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74020/new/ https://reviews.llvm.org/D74020 Files: clang/lib/Driver/ToolChains/Arch/ARM.cpp clang/lib/Driver/Tool

[PATCH] D74020: [ARM] Clean up ARM target & feature checking in clang driver.

2020-02-06 Thread Michael Liao via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG09a88120c926: [clang][driver][ARM] Clean up ARM target & feature checking in clang driver. (authored by hliao). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/

[PATCH] D73701: [clang] fix linkage of nested lambda

2020-02-07 Thread Michael Liao via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2926917f430d: [clang] Fix linkage of nested lambdas. (authored by hliao). Changed prior to commit: https://reviews.llvm.org/D73701?vs=241713&id=243224#toc Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D73701: [clang] fix linkage of nested lambda

2020-02-07 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D73701#1864136 , @blastrock wrote: > Thanks for the reviews! I do not have commit access, so please merge this > whenever you can. done in 2926917f430 . than

[PATCH] D70172: [CUDA][HIP][OpenMP] Emit deferred diagnostics by a post-parsing AST travese

2020-02-16 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. one header is missing and breaks the build Comment at: clang/lib/Sema/Sema.cpp:14 +#include "UsedDeclVisitor.h" #include "clang/AST/ASTContext.h" this file is missing and breaks the build Repository: rG LLVM Github Monorepo CHANGE

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-02-17 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. + @rjmccall Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71227/new/ https://reviews.llvm.org/D71227 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.or

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-01-21 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 239328. hliao marked 2 inline comments as done. hliao added a comment. - revise comment. - add tests requiring tempate instantiation. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71227/new/ https://reviews.llvm.

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-01-21 Thread Michael Liao via Phabricator via cfe-commits
hliao marked 2 inline comments as done. hliao added a comment. Sorry for the late reply. Really appreciate your feedback. Thanks! Comment at: clang/include/clang/Sema/Sema.h:11198-11206 + SmallVector CUDANonLocalVariableStack; + + void pushCUDANonLocalVariable(const Decl *D);

[PATCH] D73224: [hip] Remove `-Werror=format-nonliteral`

2020-01-22 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added reviewers: sameerds, yaxunl. Herald added a project: clang. Herald added a subscriber: cfe-commits. - It won't distinguish host and device code and trigger compilation failure on irrelevant code. Repository: rG LLVM Github Monorepo https://reviews.llv

[PATCH] D73224: [hip] Remove `-Werror=format-nonliteral`

2020-01-22 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. Have to remove this as it causes compilation failures on irrelevant host code during device compilation. Maybe we need to introduce a new warning option to issue that warning on device code only. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://

[PATCH] D73224: [hip] Remove `-Werror=format-nonliteral`

2020-01-23 Thread Michael Liao via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG49f7bc9e1e50: [hip] Remove `-Werror=format-nonliteral` (authored by hliao). Changed prior to commit: https://reviews.llvm.org/D73224?vs=239683&id=239910#toc Repository: rG LLVM Github Monorepo CHANG

[PATCH] D73701: [clang] fix linkage of nested lambda

2020-01-30 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. + rsmith Comment at: clang/lib/AST/Decl.cpp:1416-1417 return getLVForClosure( - OuterMostLambda->getDeclContext()->getRedeclContext(), - OuterMostLambda->getLambdaContextDecl(), computation); + R

[PATCH] D71227: [cuda][hip] Fix function overload resolution in the global initiailizer.

2020-01-30 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D71227#1831445 , @hliao wrote: > Sorry for the late reply. Really appreciate your feedback. Thanks! @rsmith Have you chance to review the revised change? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https

[PATCH] D73701: [clang] fix linkage of nested lambda

2020-01-31 Thread Michael Liao via Phabricator via cfe-commits
hliao accepted this revision. hliao added a comment. This revision is now accepted and ready to land. LGTM, but need @rsmith for the final review Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73701/new/ https://reviews.llvm.org/D73701 __

[PATCH] D115976: [clang] Fix a crash case when reporting an uninitialized field.

2021-12-17 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added a reviewer: rsmith. hliao requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. - As the initializer list's getSyntacticForm() may return NULL, need to consider the current semantic initalizer list itself

[PATCH] D115976: [clang] Fix a crash case when reporting an uninitialized field.

2021-12-17 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 395248. hliao added a comment. Revise the formatting. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115976/new/ https://reviews.llvm.org/D115976 Files: clang/include/clang/AST/Expr.h clang/lib/Sema/SemaInit.

[PATCH] D115976: [clang] Fix a crash case when reporting an uninitialized field.

2021-12-26 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 396225. hliao added a comment. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D115976/new/ https://reviews.llvm.org/D115976 Files: clang/include/clang/AST/Expr.h clang/lib/Sema/SemaInit.cpp clang/test

[PATCH] D93587: [hip] Fix HIP version parsing.

2021-01-05 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/D93587/new/ https://reviews.llvm.org/D93587 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[PATCH] D93638: [hip] Enable HIP compilation with ` on MSVC.

2021-01-05 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/D93638/new/ https://reviews.llvm.org/D93638 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin

[PATCH] D93587: [hip] Fix HIP version parsing.

2021-01-06 Thread Michael Liao via Phabricator via cfe-commits
hliao marked an inline comment as done. hliao added inline comments. Comment at: clang/lib/Driver/ToolChains/AMDGPU.cpp:97 for (auto Part : VersionParts) { auto Splits = Part.split('='); +if (Splits.first == "HIP_VERSION_MAJOR") { tra wrote: > `Part.t

[PATCH] D93587: [hip] Fix HIP version parsing.

2021-01-06 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 314941. hliao marked an inline comment as done. hliao added a comment. Revise following reviewers' comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93587/new/ https://reviews.llvm.org/D93587 Files: clan

[PATCH] D93638: [hip] Enable HIP compilation with ` on MSVC.

2021-01-06 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 314943. hliao added a comment. Only mark HD attributes in ymath.h wrapper header when compiled with MSVC. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93638/new/ https://reviews.llvm.org/D93638 Files: clang/l

[PATCH] D93638: [hip] Enable HIP compilation with ` on MSVC.

2021-01-06 Thread Michael Liao via Phabricator via cfe-commits
hliao marked an inline comment as done. hliao added inline comments. Comment at: clang/lib/Headers/__clang_hip_runtime_wrapper.h:73-74 +#define __HOST_DEVICE__ \ + static __host__ __device__ inline __attribute__((always_inl

[PATCH] D93638: [hip] Enable HIP compilation with ` on MSVC.

2021-01-06 Thread Michael Liao via Phabricator via cfe-commits
hliao added inline comments. Comment at: clang/lib/Headers/__clang_hip_runtime_wrapper.h:73-74 +#define __HOST_DEVICE__ \ + static __host__ __device__ inline __attribute__((always_inline)) +__HOST_DEVICE__ double _Cosh(doub

[PATCH] D93587: [hip] Fix HIP version parsing.

2021-01-06 Thread Michael Liao via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG2a29ce303451: [hip] Fix HIP version parsing. (authored by hliao). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93587/new/ https://reviews.llvm.org/D93587

[PATCH] D93638: [hip] Enable HIP compilation with ` on MSVC.

2021-01-06 Thread Michael Liao via Phabricator via cfe-commits
hliao added inline comments. Comment at: clang/lib/Headers/__clang_hip_runtime_wrapper.h:73-74 +#define __HOST_DEVICE__ \ + static __host__ __device__ inline __attribute__((always_inline)) +__HOST_DEVICE__ double _Cosh(doub

[PATCH] D93638: [hip] Enable HIP compilation with ` on MSVC.

2021-01-06 Thread Michael Liao via Phabricator via cfe-commits
hliao added inline comments. Comment at: clang/lib/Headers/__clang_hip_runtime_wrapper.h:73-74 +#define __HOST_DEVICE__ \ + static __host__ __device__ inline __attribute__((always_inline)) +__HOST_DEVICE__ double _Cosh(doub

[PATCH] D93638: [hip] Enable HIP compilation with ` on MSVC.

2021-01-06 Thread Michael Liao via Phabricator via cfe-commits
hliao added inline comments. Comment at: clang/lib/Headers/__clang_hip_runtime_wrapper.h:73-74 +#define __HOST_DEVICE__ \ + static __host__ __device__ inline __attribute__((always_inline)) +__HOST_DEVICE__ double _Cosh(doub

[PATCH] D93638: [hip] Enable HIP compilation with ` on MSVC.

2021-01-07 Thread Michael Liao via Phabricator via cfe-commits
hliao added inline comments. Comment at: clang/lib/Headers/__clang_hip_runtime_wrapper.h:73-74 +#define __HOST_DEVICE__ \ + static __host__ __device__ inline __attribute__((always_inline)) +__HOST_DEVICE__ double _Cosh(doub

[PATCH] D93638: [hip] Enable HIP compilation with ` on MSVC.

2021-01-07 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 315073. hliao added a comment. Forget that C function could be overloaded on Clang with overloadable extension. With that, we don't need to mark functions from `` as HD. Instead, we could provide their device-side implementation directly. Repository: rG LLVM

[PATCH] D93638: [hip] Enable HIP compilation with ` on MSVC.

2021-01-07 Thread Michael Liao via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGf78d6af7319a: [hip] Enable HIP compilation with ` on MSVC. (authored by hliao). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST

[PATCH] D95075: [hip] Fix `` compilation on Windows with VS2019.

2021-01-20 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added reviewers: tra, yaxunl. hliao requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D95075 Files: clang/lib/Headers/__clang_hip_cmath.h

[PATCH] D95075: [hip] Fix `` compilation on Windows with VS2019.

2021-01-20 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 317966. hliao added a comment. Fix typo. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95075/new/ https://reviews.llvm.org/D95075 Files: clang/lib/Headers/__clang_hip_cmath.h Index: clang/lib/Headers/__clang

[PATCH] D95075: [hip] Fix `` compilation on Windows with VS2019.

2021-01-20 Thread Michael Liao via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG7b5d7c7b0a24: [hip] Fix `` compilation on Windows with VS2019. (authored by hliao). Repository: rG LLVM Github Monorepo CHANGES SINCE LA

[PATCH] D112041: [InferAddressSpaces] Support assumed addrspaces from addrspace predicates.

2021-10-18 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added reviewers: tra, yaxunl, arsenm, rampitec. Herald added subscribers: jeroen.dobbelaere, ormris, foad, wenlei, bmahjour, kerbowa, asbirlea, rogfer01, steven_wu, george.burgess.iv, zzheng, hiraditya, nhaehnle, jvesely, jholewinski. hliao requested review of t

[PATCH] D112041: [InferAddressSpaces] Support assumed addrspaces from addrspace predicates.

2021-10-18 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 380574. hliao added a comment. Fix formatting. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112041/new/ https://reviews.llvm.org/D112041 Files: clang/test/CodeGen/thinlto-distributed-newpm.ll llvm/include/l

[PATCH] D112053: [cuda] Add address space predicate funuctions.

2021-10-18 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added a reviewer: tra. Herald added subscribers: yaxunl, jholewinski. hliao requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. - Add the missing NVVM predicate builtins on address space checking - Redefine th

[PATCH] D112053: [cuda] Add address space predicate funuctions.

2021-10-18 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. With this patch, the following code could be compiled into the same PTX as NVCC. Check https://godbolt.org/z/q6EYE1q1o for the difference between NVCC and the current Clang output. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.or

[PATCH] D112041: [InferAddressSpaces] Support assumed addrspaces from addrspace predicates.

2021-10-18 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 380581. hliao added a comment. Fix formatting again following clang-format. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112041/new/ https://reviews.llvm.org/D112041 Files: clang/test/CodeGen/thinlto-distribu

[PATCH] D112053: [cuda] Add address space predicate funuctions.

2021-10-19 Thread Michael Liao via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6fe902daf931: [cuda] Add address space predicate funuctions. (authored by hliao). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112053/new/ https://reviews.

[PATCH] D112053: [cuda] Add address space predicate funuctions.

2021-10-19 Thread Michael Liao via Phabricator via cfe-commits
hliao added inline comments. Comment at: clang/include/clang/Basic/BuiltinsNVPTX.def:691-694 +BUILTIN(__nvvm_isspacep_const, "bvC*", "nc") +BUILTIN(__nvvm_isspacep_global, "bvC*", "nc") +BUILTIN(__nvvm_isspacep_local, "bvC*", "nc") +BUILTIN(__nvvm_isspacep_shared, "bvC*", "nc") -

[PATCH] D112053: [cuda] Add address space predicate funuctions.

2021-10-19 Thread Michael Liao via Phabricator via cfe-commits
hliao added inline comments. Comment at: clang/include/clang/Basic/BuiltinsNVPTX.def:691-694 +BUILTIN(__nvvm_isspacep_const, "bvC*", "nc") +BUILTIN(__nvvm_isspacep_global, "bvC*", "nc") +BUILTIN(__nvvm_isspacep_local, "bvC*", "nc") +BUILTIN(__nvvm_isspacep_shared, "bvC*", "nc") -

[PATCH] D112041: [InferAddressSpaces] Support assumed addrspaces from addrspace predicates.

2021-10-19 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D112041#3073560 , @rampitec wrote: > Is there anything to remove assume() call after address space is inferred? We > do not need it anymore. along with a few other intrinsics, assume intrinsic is discarded in SDAG and GISel.

[PATCH] D112041: [InferAddressSpaces] Support assumed addrspaces from addrspace predicates.

2021-10-19 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 380791. hliao added a comment. Revise following reviewers' feedback. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112041/new/ https://reviews.llvm.org/D112041 Files: clang/test/CodeGen/thinlto-distributed-new

[PATCH] D112041: [InferAddressSpaces] Support assumed addrspaces from addrspace predicates.

2021-10-19 Thread Michael Liao via Phabricator via cfe-commits
hliao marked 4 inline comments as done. hliao added inline comments. Comment at: llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp:196 void inferAddressSpaces(ArrayRef Postorder, - ValueToAddrSpaceMapTy *InferredAddrSpace) const; +

[PATCH] D112053: [cuda] Add address space predicate funuctions.

2021-10-19 Thread Michael Liao via Phabricator via cfe-commits
hliao added inline comments. Comment at: clang/include/clang/Basic/BuiltinsNVPTX.def:691-694 +BUILTIN(__nvvm_isspacep_const, "bvC*", "nc") +BUILTIN(__nvvm_isspacep_global, "bvC*", "nc") +BUILTIN(__nvvm_isspacep_local, "bvC*", "nc") +BUILTIN(__nvvm_isspacep_shared, "bvC*", "nc") -

[PATCH] D112041: [InferAddressSpaces] Support assumed addrspaces from addrspace predicates.

2021-10-19 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 380798. hliao added a comment. Revise commit message. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112041/new/ https://reviews.llvm.org/D112041 Files: clang/test/CodeGen/thinlto-distributed-newpm.ll llvm/in

[PATCH] D112041: [InferAddressSpaces] Support assumed addrspaces from addrspace predicates.

2021-10-19 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D112041#3073676 , @rampitec wrote: > In D112041#3073637 , @hliao wrote: > >> In D112041#3073560 , @rampitec >> wrote: >> >>> Is there anything t

<    1   2   3   4   5   6   >