[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] 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-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] D87858: [hip] Add HIP scope atomic ops.

2021-11-11 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D87858#3125630 , @yaxunl wrote: > Hi Michael, would you like to continue working on this, or let someone from > AMD to take over? Thanks. please take over it. I will abandon it so that you could start it over. Repository: rG

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

2021-11-08 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 rGbf225939bc3a: [InferAddressSpaces] Support assumed addrspaces from addrspace predicates. (authored by hliao). Repository: rG LLVM Github Monorepo

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

2021-11-08 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 385483. hliao added a comment. Rebase and kindly PING for review. 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.

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

2021-11-07 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 385378. hliao added a comment. Rebase and ping for further review. 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

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

2021-11-05 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 385083. hliao marked an inline comment as done. hliao added a comment. Rebase to the main branch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112041/new/ https://reviews.llvm.org/D112041 Files: clang/test/Co

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

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

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

2021-11-04 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 384753. hliao added a comment. Rebase and kindly ping for review. 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.

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

2021-11-03 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D112041#3106936 , @nikic wrote: > I'd still like an answer to: > > In D112041#3073464 , @nikic wrote: > >> Is it actually necessary to thread this through AssumptionCache, given how >> I

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

2021-11-03 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 384535. hliao added a comment. Updated. 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/llvm/Ana

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

2021-11-03 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 384433. hliao added a comment. Move the updating action into `updateAddrSpace` and return a boolean true if it's really updated. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D112041/new/ https://reviews.llvm.org

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

2021-11-03 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. Herald added a subscriber: asavonic. Sorry for the late reply. Comment at: llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp:903-905 Optional InferAddressSpacesImpl::updateAddressSpace( -const Value &V, const ValueToAddrSpaceMapTy &InferredAddrSpace)

[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

[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] 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 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] 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 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] 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] 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] 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-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] 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] 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] 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] D110089: [CUDA] Implement experimental support for texture lookups.

2021-09-21 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. Cool! I like the idea of *compile-time* dispatch. LGTM except minor warnings from clang-tidy. Could you fix them before committing this change? Repository: rG LLVM Github Monorepo CHANGES SI

[PATCH] D107718: [cuda] Mark builtin texture/surface reference variable as 'externally_initialized'.

2021-08-09 Thread Michael Liao via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG6ec36d18ec7b: [cuda] Mark builtin texture/surface reference variable as… (authored by hliao). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D107718/new/ http

[PATCH] D107718: [cuda] Mark builtin texture/surface reference variable as 'externally_initialized'.

2021-08-09 Thread Michael Liao via Phabricator via cfe-commits
hliao added inline comments. Comment at: clang/lib/CodeGen/CodeGenModule.cpp:4441 if (Linkage != llvm::GlobalValue::InternalLinkage && - (D->hasAttr() || D->hasAttr())) + (D->hasAttr() || D->hasAttr() || + D->getType()->isCUDADeviceBuiltinSurfac

[PATCH] D107718: [cuda] Mark builtin texture/surface reference variable as 'externally_initialized'.

2021-08-08 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added reviewers: tra, yaxunl. Herald added a reviewer: a.sidorin. hliao requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. - They need to be preserved even if there's no reference within the device code as t

[PATCH] D104904: [OpenMP][AMDGCN] Initial math headers support

2021-07-21 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. My local build failed due to regression failures. clang/test/Headers/openmp_device_math_isnan.cpp failed with the following errors on undeclared `fabs`. 1950 /home/michliao/working/llvm/llvm-project/clang/test/Headers/Inputs/include/cstdlib:29:31: error: use of undeclar

[PATCH] D105135: [Internalize] Preserve variables externally initialized.

2021-07-08 Thread Michael Liao via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG4e5d9c88033f: [Internalize] Preserve variables externally initialized. (authored by hliao). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105135/new/ https:

[PATCH] D105135: [Internalize] Preserve variables externally initialized.

2021-07-07 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 357053. hliao added a comment. Revert part of tests back and convert them into positive ones. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105135/new/ https://reviews.llvm.org/D105135 Files: clang/test/CodeGe

[PATCH] D105135: [Internalize] Preserve variables externally initialized.

2021-07-06 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 356721. hliao added a comment. Kindly PING for review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105135/new/ https://reviews.llvm.org/D105135 Files: clang/test/CodeGenCUDA/host-used-device-var.cu clang/t

[PATCH] D105135: [Internalize] Preserve variables externally initialized.

2021-06-30 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 355764. hliao added a comment. Fix typo. Kindly PING for review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D105135/new/ https://reviews.llvm.org/D105135 Files: clang/test/CodeGenCUDA/host-used-device-var.cu

[PATCH] D105135: [Internalize] Preserve variables externally initialized.

2021-06-29 Thread Michael Liao via Phabricator via cfe-commits
hliao added inline comments. Comment at: clang/test/CodeGenCUDA/host-used-device-var.cu:20 -// DEV-NEG-NOT: @v1 -__device__ int v1; BTW, as clang codegen tests, those checks should not rely on middle-end optimizations to work correctly. Comm

[PATCH] D105135: [Internalize] Preserve variables externally initialized.

2021-06-29 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added reviewers: yaxunl, bogner. Herald added subscribers: ormris, hiraditya. hliao requested review of this revision. Herald added projects: clang, LLVM. Herald added subscribers: llvm-commits, cfe-commits. - ``externally_initialized`` variables would be initial

[PATCH] D97318: [clang][CodeGen] Allow fp16 arg pass by register

2021-02-25 Thread Michael Liao via Phabricator via cfe-commits
hliao added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:2821 +} else if (k == BuiltinType::Float16 || k == BuiltinType::Half) { + // AMD64 does not support operations on _Float16 or __fp16 other than + // load and store. For load/store operations,

[PATCH] D97318: [clang][CodeGen] Allow fp16 arg pass by register

2021-02-25 Thread Michael Liao via Phabricator via cfe-commits
hliao added inline comments. Comment at: clang/lib/CodeGen/TargetInfo.cpp:2821 +} else if (k == BuiltinType::Float16 || k == BuiltinType::Half) { + // AMD64 does not support operations on _Float16 or __fp16 other than + // load and store. For load/store operations,

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

2021-02-03 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 rGa2fdf9d4d734: [hip][cuda] Enable extended lambda support on Windows. (authored by hliao). Changed prior to commit: https://reviews.llvm.org/D69322

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

2021-02-03 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. @rsmith, @rnk and @rjmccall, could you review the latest change addressing the memory usage issue? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D69322/new/ https://reviews.llvm.org/D69322 ___

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

2021-02-02 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.llvm.

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

2021-02-01 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 320679. hliao added a comment. Revise comments. 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/ASTContext.h clang/include/clang/AST/De

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

2021-02-01 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 320568. hliao added a comment. - Remove `DeviceManglingNumber` to reduce memory usage. - Add a table in ASTContext for device lambda mangling numbers if that lamba requires. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.ll

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

2021-02-01 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 320409. hliao added a comment. Rebase to the main branch. 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/clang

[PATCH] D87858: [hip] Add HIP scope atomic ops.

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

[PATCH] D87858: [hip] Add HIP scope atomic ops.

2021-01-25 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 319013. hliao added a comment. Herald added a subscriber: dexonsmith. Rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87858/new/ https://reviews.llvm.org/D87858 Files: clang/include/clang/AST/Expr.h cla

[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] 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
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] 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] 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
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-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 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 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] 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] 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] 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-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.

2020-12-21 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 313211. hliao added a comment. Herald added a subscriber: mgorny. Fix the cmake to distribute that header wrapper. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93638/new/ https://reviews.llvm.org/D93638 Files:

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

2020-12-21 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 313199. hliao added a comment. These functions are pure C functions. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93638/new/ https://reviews.llvm.org/D93638 Files: clang/lib/Headers/__clang_hip_runtime_wrappe

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

2020-12-21 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. In D93638#2466097 , @jdoerfert wrote: > Disclaimer: I request changes because of the next sentence, other than that I > have no objection but also cannot review this. > All `cuda_wrapper` headers say something about complex in the f

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

2020-12-21 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 313138. hliao added a comment. Fix license. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93638/new/ https://reviews.llvm.org/D93638 Files: clang/lib/Headers/__clang_hip_runtime_wrapper.h clang/lib/Headers/c

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

2020-12-21 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 313136. hliao added a comment. Fix typo again. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93638/new/ https://reviews.llvm.org/D93638 Files: clang/lib/Headers/__clang_hip_runtime_wrapper.h clang/lib/Header

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

2020-12-21 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 313116. hliao added a comment. Fix typo. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D93638/new/ https://reviews.llvm.org/D93638 Files: clang/lib/Headers/__clang_hip_runtime_wrapper.h clang/lib/Headers/cuda

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

2020-12-21 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. Beyond the enabling of the compilation with `` on Windows, I really have the concern on the current approach supporting `` compilation in the device compilation. The device compilation should not relies on the host STL implementation. That results in inconsistent compilat

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

2020-12-21 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. - MSVC has different `` implementation which calls into functions declared in ``. Instead of through builtins or inline

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

2020-12-19 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added reviewers: yaxunl, tra. Herald added subscribers: kerbowa, nhaehnle, jvesely. hliao requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. - Need trimming before parsing major or minor version numbers. This

[PATCH] D92893: [CUDA] Do not diagnose host/device variable access in dependent types.

2020-12-10 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 if you revise the test based on Sam's suggestion on the test case. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92893/new/ https://reviews.l

[PATCH] D92893: [CUDA] Do not diagnose host/device variable access in dependent types.

2020-12-08 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. LGTM if there's a regression test available. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92893/new/ https://reviews.llvm.org/D92893 ___ cfe-commits mailing list cfe-commits@lists

[PATCH] D92418: [hip] Fix host object creation from fatbin

2020-12-02 Thread Michael Liao via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGd8949a8ad3ca: [hip] Fix host object creation from fatbin (authored by hliao). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D92418/new/ https://reviews.llvm.

[PATCH] D92418: [hip] Fix host object creation from fatbin

2020-12-01 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. Even there's no functionality change, the original one breaks the kernel extraction script, which is designed to find the `.hip_fatbin` section. That internal tool is still required to extract kernels from objects generated from RDC linking. Repository: rG LLVM Github

[PATCH] D92418: [hip] Fix host object creation from fatbin

2020-12-01 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added reviewers: yaxunl, ashi1. Herald added a project: clang. Herald added a subscriber: cfe-commits. hliao requested review of this revision. - `__hip_fatbin` should a symbol in `.hip_fatbin` section. Repository: rG LLVM Github Monorepo https://reviews.llv

[PATCH] D91590: [NVPTX] Efficently support dynamic index on CUDA kernel aggregate parameters.

2020-11-18 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. As mentioned earlier, that's very experimental support. Even though the SASS looks reasonable, it still needs verifying on real systems. For non-kernel functions, it seems we share the path. So that we should do a similar thing. The current approach fixes that in the code

[PATCH] D91590: [NVPTX] Efficently support dynamic index on CUDA kernel aggregate parameters.

2020-11-16 Thread Michael Liao via Phabricator via cfe-commits
hliao added a comment. This's an experimental or demo-only patch in my spare time on eliminating private memory usage in https://godbolt.org/z/EPPn6h. The attachment F14026286: sample.tar.xz includes both the reference and new IR, PTX, and SASS (sm_60) outpu

[PATCH] D91590: [NVPTX] Efficently support dynamic index on CUDA kernel aggregate parameters.

2020-11-16 Thread Michael Liao via Phabricator via cfe-commits
hliao created this revision. hliao added a reviewer: tra. Herald added subscribers: llvm-commits, cfe-commits, arphaman, hiraditya, yaxunl, mgorny, jholewinski. Herald added projects: clang, LLVM. hliao requested review of this revision. Repository: rG LLVM Github Monorepo https://reviews.llvm

[PATCH] D91121: [InferAddrSpace] Teach to handle assumed address space.

2020-11-16 Thread Michael Liao via Phabricator via cfe-commits
hliao added inline comments. Comment at: llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp:483 +// Skip values with an assumed address space. +if (TTI->getAssumedAddrSpace(TopVal) == UninitializedAddressSpace) { + for (Value *PtrOperand : getPointerOperands(*TopVal,

[PATCH] D91121: [InferAddrSpace] Teach to handle assumed address space.

2020-11-16 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 rGf375885ab86d: [InferAddrSpace] Teach to handle assumed address space. (authored by hliao). Changed prior to commit: https://reviews.llvm.org/D9112

[PATCH] D91121: [InferAddrSpace] Teach to handle assumed address space.

2020-11-16 Thread Michael Liao via Phabricator via cfe-commits
hliao added inline comments. Comment at: llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp:533 + if (!LD) +return -1; + tra wrote: > Is there a suitable constant for `don't know` result? I would say all generic pointers loaded from the constant memory are safe

[PATCH] D91121: [InferAddrSpace] Teach to handle assumed address space.

2020-11-16 Thread Michael Liao via Phabricator via cfe-commits
hliao marked 3 inline comments as done. hliao added a comment. Kindly ping for review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91121/new/ https://reviews.llvm.org/D91121 ___ cfe-commits mailing lis

[PATCH] D91121: [InferAddrSpace] Teach to handle assumed address space.

2020-11-13 Thread Michael Liao via Phabricator via cfe-commits
hliao marked 3 inline comments as done. hliao added inline comments. Comment at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:227 + Optional getAssumedAddrSpace(const Value *V) const { +return getTLI()->getTargetMachine().getAssumedAddrSpace(V); arsenm wrote:

[PATCH] D91121: [InferAddrSpace] Teach to handle assumed address space.

2020-11-13 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 305250. hliao marked an inline comment as done. hliao added a comment. Revise the interface of that target hook. Add a dedicated test case for value reading from parameter even though most cases are already covered in the clang test. Repository: rG LLVM Git

[PATCH] D91121: [InferAddrSpace] Teach to handle assumed address space.

2020-11-13 Thread Michael Liao via Phabricator via cfe-commits
hliao marked an inline comment as done. hliao added inline comments. Comment at: llvm/lib/Target/AMDGPU/AMDGPUTargetMachine.cpp:533 + auto *Ty = V->getType(); + if (!Ty->isPointerTy() || + Ty->getPointerAddressSpace() != AMDGPUAS::FLAT_ADDRESS) arsenm wrot

[PATCH] D91121: [InferAddrSpace] Teach to handle assumed address space.

2020-11-13 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 305203. hliao added a comment. Revise the condition check. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D91121/new/ https://reviews.llvm.org/D91121 Files: clang/test/CodeGenCUDA/amdgpu-kernel-arg-pointer-type.

[PATCH] D91121: [InferAddrSpace] Teach to handle assumed address space.

2020-11-13 Thread Michael Liao via Phabricator via cfe-commits
hliao added inline comments. Comment at: llvm/include/llvm/CodeGen/BasicTTIImpl.h:227 + Optional getAssumedAddrSpace(const Value *V) const { +return getTLI()->getTargetMachine().getAssumedAddrSpace(V); hliao wrote: > arsenm wrote: > > We already have a -1

[PATCH] D91121: [InferAddrSpace] Teach to handle assumed address space.

2020-11-13 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 305154. hliao added a comment. Herald added a project: clang. Herald added a subscriber: cfe-commits. - Add a note in the AMDGPU usage document on the assumption made here. - Revise the test in clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST A

[PATCH] D89980: [hip] Remove the coercion on aggregate kernel arguments.

2020-11-12 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. hliao marked an inline comment as done. Closed by commit rG8920ef06a138: [hip] Remove the coercion on aggregate kernel arguments. (authored by hliao). Repository: rG

[PATCH] D89980: [hip] Remove the coercion on aggregate kernel arguments.

2020-11-12 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-kernel-arg-pointer-type.cu:55 struct S { int *x; arsenm wrote: > Should also have a case with a single element struct, which will be treated > li

[PATCH] D89980: [hip] Remove the coercion on aggregate kernel arguments.

2020-11-12 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 304969. hliao added a comment. Add a test case for the single element struct. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89980/new/ https://reviews.llvm.org/D89980 Files: clang/lib/CodeGen/TargetInfo.cpp

[PATCH] D89980: [hip] Remove the coercion on aggregate kernel arguments.

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

[PATCH] D89980: [hip] Remove kernel argument coercion.

2020-11-10 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 304182. hliao added a comment. Revise the commit message. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89980/new/ https://reviews.llvm.org/D89980 Files: clang/lib/CodeGen/TargetInfo.cpp clang/test/CodeGenCU

[PATCH] D89980: [hip] Remove kernel argument coercion.

2020-11-10 Thread Michael Liao via Phabricator via cfe-commits
hliao updated this revision to Diff 304181. hliao added a comment. Remove aggregate kernel argument coercion only. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D89980/new/ https://reviews.llvm.org/D89980 Files: clang/lib/CodeGen/TargetInfo.cpp

[PATCH] D90809: [amdgpu] Add `llvm.amdgcn.endpgm` support.

2020-11-05 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 rG23c6d1501d80: [amdgpu] Add `llvm.amdgcn.endpgm` support. (authored by hliao). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION htt

  1   2   3   4   5   6   >