[mlir] [llvm] [clang-tools-extra] [clang] [mlir][spirv] Support alias/restrict function argument decorations (PR #76353)

2024-01-06 Thread Lei Zhang via cfe-commits
antiagainst wrote: > @kuhar @antiagainst Thanks for your comment and support to land this PR! If > you have any issues or TODO tasks in SPIR-V dialect, I would be happy if you > could share it with me. :) Thanks for your further interest! Please feel free to take a look at issues with the

[mlir] [clang-tools-extra] [clang] [llvm] [mlir][spirv] Support alias/restrict function argument decorations (PR #76353)

2024-01-06 Thread Lei Zhang via cfe-commits
https://github.com/antiagainst closed https://github.com/llvm/llvm-project/pull/76353 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[mlir] [clang-tools-extra] [clang] [llvm] [mlir][spirv] Support alias/restrict function argument decorations (PR #76353)

2024-01-06 Thread Lei Zhang via cfe-commits
https://github.com/antiagainst edited https://github.com/llvm/llvm-project/pull/76353 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[mlir] [clang-tools-extra] [clang] [llvm] [mlir][spirv] Support function argument decorations for ptr in the PhysicalStorageBuffer (PR #76353)

2024-01-06 Thread Lei Zhang via cfe-commits
antiagainst wrote: Thanks a lot for the contribution and bearing with me for the nitpicking. :) To avoid burden you further, I rebased and revised some comment/error message slightly. :) I'll land once bots are happy. https://github.com/llvm/llvm-project/pull/76353

[mlir] [clang-tools-extra] [clang] [llvm] [mlir][spirv] Support function argument decorations for ptr in the PhysicalStorageBuffer (PR #76353)

2024-01-06 Thread Lei Zhang via cfe-commits
https://github.com/antiagainst updated https://github.com/llvm/llvm-project/pull/76353 >From ebd9634057e9417905d7fcd27bac829c5d0889e0 Mon Sep 17 00:00:00 2001 From: Kohei Yamaguchi Date: Fri, 22 Dec 2023 17:22:25 + Subject: [PATCH 01/10] [mlir][spirv] Support function argument decorations

[clang] [mlir] [clang-tools-extra] [llvm] [mlir][spirv] Fix spirv dialect to support Specialization constants as GlobalVar initializer (PR #75660)

2024-01-05 Thread Lei Zhang via cfe-commits
https://github.com/antiagainst closed https://github.com/llvm/llvm-project/pull/75660 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[mlir] [clang] [clang-tools-extra] [llvm] [mlir][spirv] Fix spirv dialect to support Specialization constants as GlobalVar initializer (PR #75660)

2024-01-05 Thread Lei Zhang via cfe-commits
antiagainst wrote: Thanks for the contribution! Sorry about the delay in reviews. I do have some style-ish comments but given this has been a while I just went ahead fixed them and will land this path directly. Thanks again! https://github.com/llvm/llvm-project/pull/75660

[clang] [mlir] [llvm] [clang-tools-extra] [mlir][spirv] Fix spirv dialect to support Specialization constants as GlobalVar initializer (PR #75660)

2024-01-05 Thread Lei Zhang via cfe-commits
https://github.com/antiagainst approved this pull request. https://github.com/llvm/llvm-project/pull/75660 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [mlir] [llvm] [clang-tools-extra] [mlir][spirv] Fix spirv dialect to support Specialization constants as GlobalVar initializer (PR #75660)

2024-01-05 Thread Lei Zhang via cfe-commits
https://github.com/antiagainst updated https://github.com/llvm/llvm-project/pull/75660 >From fd8c637f2b146ffce657307841f84a4123e351af Mon Sep 17 00:00:00 2001 From: Dimple Prajapati Date: Wed, 13 Dec 2023 22:33:23 + Subject: [PATCH 1/6] [mlir][spirv] Fix spirv dialect to support

[libc] [compiler-rt] [llvm] [lldb] [lld] [clang-tools-extra] [mlir] [clang] [openmp] [libcxx] [flang] [MLIR] Enabling Intel GPU Integration. (PR #65539)

2023-11-26 Thread Lei Zhang via cfe-commits
antiagainst wrote: Thanks for breaking down this pull request into various smaller pieces to make it easier for review. I looked at various pieces; LGTM. Looking forward to see this being supported! :) from @joker-eph: > Vulkan and Spirv still have dedicated runners on the model of the

[mlir] [flang] [clang-tools-extra] [lldb] [llvm] [libc] [lld] [compiler-rt] [libcxx] [clang] [MLIR] Enable GPU Dialect to SYCL runtime integration (PR #71430)

2023-11-26 Thread Lei Zhang via cfe-commits
https://github.com/antiagainst approved this pull request. LGTM regarding SPIR-V. But please address comments from others. :) https://github.com/llvm/llvm-project/pull/71430 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[compiler-rt] [llvm] [clang-tools-extra] [clang] [flang] [lldb] [mlir] [libcxx] [mlir] Prepare convert-gpu-to-spirv for OpenCL support (PR #69941)

2023-11-05 Thread Lei Zhang via cfe-commits
antiagainst wrote: > @antiagainst @joker-eph Can someone merge this PR? Thanks in advance. Done. Thanks for the contribution again! https://github.com/llvm/llvm-project/pull/69941 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[compiler-rt] [llvm] [clang-tools-extra] [clang] [flang] [lldb] [mlir] [libcxx] [mlir] Prepare convert-gpu-to-spirv for OpenCL support (PR #69941)

2023-11-05 Thread Lei Zhang via cfe-commits
https://github.com/antiagainst closed https://github.com/llvm/llvm-project/pull/69941 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[compiler-rt] [llvm] [clang-tools-extra] [clang] [flang] [libc] [mlir] [libcxx] [mlir][spirv] Implement gpu::TargetAttrInterface (PR #69949)

2023-11-05 Thread Lei Zhang via cfe-commits
@@ -15,6 +15,7 @@ #include "Utils.h" #include "mlir/Dialect/GPU/IR/GPUDialect.h" +#include "mlir/Dialect/SPIRV/IR/SPIRVAttributes.h" antiagainst wrote: SG. Thanks @jpienaar & @fabianmcg! https://github.com/llvm/llvm-project/pull/69949

[flang] [clang] [compiler-rt] [libcxx] [llvm] [libc] [mlir] [clang-tools-extra] [mlir][spirv] Implement gpu::TargetAttrInterface (PR #69949)

2023-11-05 Thread Lei Zhang via cfe-commits
antiagainst wrote: Sorry about that! I uploaded https://github.com/llvm/llvm-project/commit/4a4b8570f7c16346094c59fab1bd8debf9b177e1 to fix this. Verified that it fixes the break for me locally. https://github.com/llvm/llvm-project/pull/69949 ___

[clang] [clang-tools-extra] [libcxx] [libc] [llvm] [mlir] [compiler-rt] [flang] [mlir][spirv] Implement gpu::TargetAttrInterface (PR #69949)

2023-11-05 Thread Lei Zhang via cfe-commits
antiagainst wrote: I revised the commit message a bit and landed it. Thanks for the waiting! https://github.com/llvm/llvm-project/pull/69949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-tools-extra] [libcxx] [libc] [llvm] [mlir] [compiler-rt] [flang] [mlir][spirv] Implement gpu::TargetAttrInterface (PR #69949)

2023-11-05 Thread Lei Zhang via cfe-commits
https://github.com/antiagainst closed https://github.com/llvm/llvm-project/pull/69949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] [libc] [llvm] [mlir] [compiler-rt] [flang] [mlir][spirv] Implement gpu::TargetAttrInterface (PR #69949)

2023-11-05 Thread Lei Zhang via cfe-commits
https://github.com/antiagainst edited https://github.com/llvm/llvm-project/pull/69949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-tools-extra] [libcxx] [libc] [llvm] [mlir] [compiler-rt] [flang] [MLIR] SPIRV Target Attribute (PR #69949)

2023-11-05 Thread Lei Zhang via cfe-commits
https://github.com/antiagainst approved this pull request. LGTM. Thanks for addressing the comments! https://github.com/llvm/llvm-project/pull/69949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-28 Thread Lei Zhang via cfe-commits
@@ -0,0 +1,30 @@ +//===- Target.h - MLIR SPIRV target registration *- C++ -*-===// antiagainst wrote: Nit: again, please use SPIR-V in docs and comments. https://github.com/llvm/llvm-project/pull/69949

[clang] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-28 Thread Lei Zhang via cfe-commits
@@ -188,4 +188,46 @@ def GpuROCDLAttachTarget: Pass<"rocdl-attach-target", ""> { ]; } +def GpuSPIRVAttachTarget: Pass<"spirv-attach-target", ""> { + let summary = "Attaches an SPIRV target attribute to a GPU Module."; antiagainst wrote: Nit:

[clang-tools-extra] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-28 Thread Lei Zhang via cfe-commits
@@ -188,4 +188,46 @@ def GpuROCDLAttachTarget: Pass<"rocdl-attach-target", ""> { ]; } +def GpuSPIRVAttachTarget: Pass<"spirv-attach-target", ""> { + let summary = "Attaches an SPIRV target attribute to a GPU Module."; + let description = [{ +This pass searches for all

[clang-tools-extra] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-28 Thread Lei Zhang via cfe-commits
@@ -0,0 +1,117 @@ +//===- Target.cpp - MLIR SPIRV target compilation ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-28 Thread Lei Zhang via cfe-commits
https://github.com/antiagainst requested changes to this pull request. Thanks again for the contribution! A couple of comments inlined. My main concern is the duplication of `spirv.target` attribute. We should avoid the duplication and confusion there.

[clang-tools-extra] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-28 Thread Lei Zhang via cfe-commits
@@ -0,0 +1,30 @@ +//===- Target.h - MLIR SPIRV target registration *- C++ -*-===// antiagainst wrote: Nit: again, please use SPIR-V in docs and comments. https://github.com/llvm/llvm-project/pull/69949

[clang-tools-extra] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-28 Thread Lei Zhang via cfe-commits
@@ -166,4 +166,35 @@ def SPIRV_ResourceLimitsAttr : SPIRV_Attr<"ResourceLimits", "resource_limits"> { let assemblyFormat = "`<` struct(params) `>`"; } +//===--===// +// SPIRV target attribute.

[clang-tools-extra] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-28 Thread Lei Zhang via cfe-commits
@@ -188,4 +188,46 @@ def GpuROCDLAttachTarget: Pass<"rocdl-attach-target", ""> { ]; } +def GpuSPIRVAttachTarget: Pass<"spirv-attach-target", ""> { + let summary = "Attaches an SPIRV target attribute to a GPU Module."; antiagainst wrote: Nit:

[clang] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-28 Thread Lei Zhang via cfe-commits
@@ -0,0 +1,117 @@ +//===- Target.cpp - MLIR SPIRV target compilation ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-28 Thread Lei Zhang via cfe-commits
@@ -188,4 +188,46 @@ def GpuROCDLAttachTarget: Pass<"rocdl-attach-target", ""> { ]; } +def GpuSPIRVAttachTarget: Pass<"spirv-attach-target", ""> { + let summary = "Attaches an SPIRV target attribute to a GPU Module."; + let description = [{ +This pass searches for all

[clang-tools-extra] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-28 Thread Lei Zhang via cfe-commits
@@ -0,0 +1,94 @@ +//===- SPIRVAttachTarget.cpp - Attach an SPIRV target -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-28 Thread Lei Zhang via cfe-commits
@@ -166,4 +166,35 @@ def SPIRV_ResourceLimitsAttr : SPIRV_Attr<"ResourceLimits", "resource_limits"> { let assemblyFormat = "`<` struct(params) `>`"; } +//===--===// +// SPIRV target attribute.

[clang] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-28 Thread Lei Zhang via cfe-commits
@@ -0,0 +1,94 @@ +//===- SPIRVAttachTarget.cpp - Attach an SPIRV target -===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-28 Thread Lei Zhang via cfe-commits
@@ -0,0 +1,117 @@ +//===- Target.cpp - MLIR SPIRV target compilation ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-28 Thread Lei Zhang via cfe-commits
@@ -0,0 +1,117 @@ +//===- Target.cpp - MLIR SPIRV target compilation ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-28 Thread Lei Zhang via cfe-commits
@@ -188,4 +188,46 @@ def GpuROCDLAttachTarget: Pass<"rocdl-attach-target", ""> { ]; } +def GpuSPIRVAttachTarget: Pass<"spirv-attach-target", ""> { + let summary = "Attaches an SPIRV target attribute to a GPU Module."; + let description = [{ +This pass searches for all

[clang] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-28 Thread Lei Zhang via cfe-commits
@@ -0,0 +1,117 @@ +//===- Target.cpp - MLIR SPIRV target compilation ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-28 Thread Lei Zhang via cfe-commits
@@ -0,0 +1,7 @@ +// RUN: mlir-opt %s --spirv-attach-target='module=spirv.* ver=v1.0 caps=Kernel' | FileCheck %s + +module attributes {gpu.container_module} { +// CHECK: @spirv_module_1 [#spirv.target, resource_limits = <>>] +gpu.module @spirv_module_1 {

[clang-tools-extra] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-28 Thread Lei Zhang via cfe-commits
@@ -0,0 +1,117 @@ +//===- Target.cpp - MLIR SPIRV target compilation ---*- C++ -*-===// antiagainst wrote: Nit: again, please use SPIR-V in docs and comments. Please make sure everywhere follows the convention. :)

[clang] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-28 Thread Lei Zhang via cfe-commits
@@ -166,4 +166,35 @@ def SPIRV_ResourceLimitsAttr : SPIRV_Attr<"ResourceLimits", "resource_limits"> { let assemblyFormat = "`<` struct(params) `>`"; } +//===--===// +// SPIRV target attribute.

[clang] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-28 Thread Lei Zhang via cfe-commits
@@ -0,0 +1,117 @@ +//===- Target.cpp - MLIR SPIRV target compilation ---*- C++ -*-===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang-tools-extra] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-28 Thread Lei Zhang via cfe-commits
https://github.com/antiagainst edited https://github.com/llvm/llvm-project/pull/69949 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [MLIR] Update convert-gpu-to-spirv pass to prepare using GPU compilat… (PR #69941)

2023-10-28 Thread Lei Zhang via cfe-commits
@@ -54,22 +55,52 @@ void GPUToSPIRVPass::runOnOperation() { SmallVector gpuModules; OpBuilder builder(context); + + auto targetEnvSupportsKernelCapability = [](gpu::GPUModuleOp moduleOp) { +Operation *gpuModule = moduleOp.getOperation(); +auto targetAttr =

[clang] [MLIR] Update convert-gpu-to-spirv pass to prepare using GPU compilat… (PR #69941)

2023-10-28 Thread Lei Zhang via cfe-commits
https://github.com/antiagainst requested changes to this pull request. Nice. Just one final request. https://github.com/llvm/llvm-project/pull/69941 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [MLIR] Update convert-gpu-to-spirv pass to prepare using GPU compilat… (PR #69941)

2023-10-28 Thread Lei Zhang via cfe-commits
https://github.com/antiagainst edited https://github.com/llvm/llvm-project/pull/69941 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [MLIR] Update convert-gpu-to-spirv pass to prepare using GPU compilat… (PR #69941)

2023-10-28 Thread Lei Zhang via cfe-commits
https://github.com/antiagainst requested changes to this pull request. Nice. Just one final request. https://github.com/llvm/llvm-project/pull/69941 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-27 Thread Lei Zhang via cfe-commits
antiagainst wrote: Thanks for the contribution and sorry about the delay! I'm getting around to review this pull request (already done a few others). Please wait a bit. https://github.com/llvm/llvm-project/pull/69949 ___ cfe-commits mailing list

[clang-tools-extra] [MLIR] SPIRV Target Attribute (PR #69949)

2023-10-27 Thread Lei Zhang via cfe-commits
antiagainst wrote: Thanks for the contribution and sorry about the delay! I'm getting around to review this pull request (already done a few others). Please wait a bit. https://github.com/llvm/llvm-project/pull/69949 ___ cfe-commits mailing list

[PATCH] [Request, 2 lines] D25071: [openmp] fix a compile error on musl-libc

2016-09-30 Thread Lei Zhang via cfe-commits
zlei created this revision. zlei added a reviewer: jcownie. zlei added a subscriber: cfe-commits. Function `strerror_r()` has different signatures in different implementations of libc: glibc's version returns a `char*`, while BSDs and musl return a `int`. libomp unconditionally assumes glibc on

Re: [PATCH] D24119: [libc++] add linker option "-Wl, -z, defs" in standalone build

2016-09-27 Thread Lei Zhang via cfe-commits
zlei added inline comments. Comment at: libcxx/trunk/CMakeLists.txt:329 @@ +328,3 @@ + ${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD") AND + NOT LLVM_USE_SANITIZER) +set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,defs") rmaprath

Re: [PATCH] D24069: Document option '-rtlib' in clang's man page and help info

2016-09-13 Thread Lei Zhang via cfe-commits
zlei added a comment. In https://reviews.llvm.org/D24069#540804, @Hahnfeld wrote: > @zlei will you commit the patch or do you want me to do that on your behalf? I don't have commit access, so please do me a favor :) https://reviews.llvm.org/D24069

Re: [PATCH] D24069: Document option '-rtlib' in clang's man page and help info

2016-09-01 Thread Lei Zhang via cfe-commits
zlei edited reviewers, added: bruno; removed: cfe-commits. zlei edited subscribers, added: cfe-commits; removed: bruno. zlei updated this revision to Diff 69947. zlei added a comment. Update the man page entry to state default behavior of this option. https://reviews.llvm.org/D24069 Files:

[PATCH] D24119: [libc++] add linker option "-Wl, -z, defs" in standalone build

2016-08-31 Thread Lei Zhang via cfe-commits
zlei created this revision. zlei added a reviewer: cfe-commits. This option is used to avoid underlinking. It's available in LLVM's main tree, but not in a standalone build of libc++. This patch ensures the option is passed in whether libc++ is built in-tree or out-of-tree.

[PATCH] D24069: Document option '-rtlib' in clang's man page and help info

2016-08-31 Thread Lei Zhang via cfe-commits
zlei created this revision. zlei added reviewers: cfe-commits, Hahnfeld. This patch adds an entry for "-rtlib" in the output of `man clang` and `clang -help`. https://reviews.llvm.org/D24069 Files: docs/CommandGuide/clang.rst include/clang/Driver/Options.td Index:

Re: [PATCH] D22904: Fix two bugs for musl-libc on ARM

2016-08-08 Thread Lei Zhang via cfe-commits
zlei added a comment. @rovka Thanks a lot :) Repository: rL LLVM https://reviews.llvm.org/D22904 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D22904: Fix two bugs for musl-libc on ARM

2016-08-07 Thread Lei Zhang via cfe-commits
zlei added a comment. @rengolin Could you please apply this patch? I don't have the permission. Thanks. https://reviews.llvm.org/D22904 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

Re: [PATCH] D22904: Fix two bugs for musl-libc on ARM

2016-07-28 Thread Lei Zhang via cfe-commits
zlei added a comment. @rengolin Thanks for your comments. Patch updated. https://reviews.llvm.org/D22904 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D22904: Fix two bugs for musl-libc on ARM

2016-07-28 Thread Lei Zhang via cfe-commits
zlei updated this revision to Diff 66074. zlei added a comment. Restructure the code and add a few tests. https://reviews.llvm.org/D22904 Files: lib/Driver/ToolChains.cpp test/Driver/linux-ld.c Index: test/Driver/linux-ld.c

Re: [PATCH] D22663: Support setting default value for -rtlib at build time

2016-07-27 Thread Lei Zhang via cfe-commits
zlei added a comment. @Hahnfeld Could you please commit it? I don't have the access. Thanks :) https://reviews.llvm.org/D22663 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D22663: Support setting default value for -rtlib at build time

2016-07-26 Thread Lei Zhang via cfe-commits
zlei added a comment. @Hahnfeld Your patch applied. Thanks. https://reviews.llvm.org/D22663 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D22663: Support setting default value for -rtlib at build time

2016-07-26 Thread Lei Zhang via cfe-commits
zlei updated this revision to Diff 65643. zlei added a comment. Fix a bug on Darwin that crashes clang when `CLANG_DEFAULT_RTLIB=libgcc` https://reviews.llvm.org/D22663 Files: CMakeLists.txt include/clang/Config/config.h.cmake lib/Driver/ToolChain.cpp lib/Driver/ToolChains.cpp

Re: [PATCH] D22663: Support setting default value for -rtlib at build time

2016-07-26 Thread Lei Zhang via cfe-commits
zlei added inline comments. Comment at: CMakeLists.txt:210 @@ -202,3 +209,3 @@ set(CLANG_VENDOR ${PACKAGE_VENDOR} CACHE STRING "Vendor-specific text for showing with version information.") Hahnfeld wrote: > zlei wrote: > > I think the original code for

Re: [PATCH] D22663: Support setting default value for -rtlib at build time

2016-07-26 Thread Lei Zhang via cfe-commits
zlei added inline comments. Comment at: CMakeLists.txt:210 @@ -202,3 +209,3 @@ set(CLANG_VENDOR ${PACKAGE_VENDOR} CACHE STRING "Vendor-specific text for showing with version information.") I think the original code for resetting `CLANG_DEFAULT_CXX_STDLIB`

Re: [PATCH] D22663: Support setting default value for -rtlib at build time

2016-07-26 Thread Lei Zhang via cfe-commits
zlei updated this revision to Diff 65497. zlei added a comment. Herald added subscribers: srhines, danalbert, tberghammer. Support a new option `-rtlib=platform` for internal use, and fix tests that previously failed when configured with `CLANG_DEFAULT_RTLIB=compiler-rt`.

Re: [PATCH] D22663: Support setting default value for -rtlib at build time

2016-07-25 Thread Lei Zhang via cfe-commits
zlei added a comment. In https://reviews.llvm.org/D22663#494460, @Hahnfeld wrote: > With the changes applied and configured with > `CLANG_DEFAULT_RTLIB=compiler-rt` some tests fail so you may have to adapt > the idea of `-rtlib=platform` for the tests. Got it. And I also need to fix those

[PATCH] D22716: [libunwind] support building shared lib and static lib simultaneously

2016-07-22 Thread Lei Zhang via cfe-commits
zlei created this revision. zlei added reviewers: rmaprath, EricWF, cfe-commits. Currently libunwind can be configured to build either shared lib or static lib, but not both. Downstream package maintainers may want to build/install shared lib and static lib simultaneously, without configuring

[PATCH] D22663: Support setting default value for -rtlib at build time

2016-07-21 Thread Lei Zhang via cfe-commits
zlei created this revision. zlei added reviewers: cfe-commits, ddunbar, Hahnfeld. This patch introduces a new cmake variable: CLANG_DEFAULT_RTLIB, thru which we can specify a default value for -rtlib (libgcc or compiler-rt) at build time, just like how we set the default C++ stdlib thru

Support setting default value for -rtlib at build time

2016-07-17 Thread Lei Zhang via cfe-commits
Hi, This patch introduces a new cmake variable: CLANG_DEFAULT_RTLIB, thru which we can specify a default value for -rtlib (libgcc or compiler-rt) at build time, just like how we set the default C++ stdlib thru CLANG_DEFAULT_CXX_STDLIB. With these two options, we can configure clang to build

Re: [gentoo-musl] Re: Add support for musl-libc on Linux

2016-06-24 Thread Lei Zhang via cfe-commits
2016-06-24 16:02 GMT+08:00 Peter Smith : > Hello Lei, > > They look good enough for me. Unless anyone else has any objections I > think you are good to go. I just see them committed by r273735 in clang and r273726 in LLVM. Peter, thank you for the comments; and Rafael,

Re: [gentoo-musl] Re: Add support for musl-libc on Linux

2016-06-23 Thread Lei Zhang via cfe-commits
2016-06-22 16:55 GMT+08:00 Peter Smith : > Hello Lei, > > Thanks for all the updates. That looks good to me from an ARM perspective. Ping. Are the patches good enough to be committed? Lei ___ cfe-commits mailing list

Re: [gentoo-musl] Re: Add support for musl-libc on Linux

2016-06-22 Thread Lei Zhang via cfe-commits
2016-06-21 23:07 GMT+08:00 Peter Smith : > Hello Lei, > > The changes to llvm and clang look ok to me. I've got some suggestions > for testing. > > For the clang patch, it looks like there isn't a test to check that > musleabihf implies hard floating point. It looks like >

Re: [gentoo-musl] Re: Add support for musl-libc on Linux

2016-06-21 Thread Lei Zhang via cfe-commits
2016-06-20 19:05 GMT+08:00 Lei Zhang : > 2016-06-18 8:52 GMT+08:00 Rafael Espíndola : >> There are probably a few more places that need to be patched. >> >> In particular, take a look at lib/Target/ARM. There are things like >> computeTargetABI

Re: [gentoo-musl] Re: Add support for musl-libc on Linux

2016-06-20 Thread Lei Zhang via cfe-commits
2016-06-20 19:44 GMT+08:00 Peter Smith : > From what I can see, the EABI type is used to decide if certain > __aeabi_ prefixed functions such as __aeabi_idiv are available. If > Musl differs in function availability from the GNU library here I > think you'll need a Musl

Re: [gentoo-musl] Re: Add support for musl-libc on Linux

2016-06-20 Thread Lei Zhang via cfe-commits
2016-06-18 8:52 GMT+08:00 Rafael Espíndola : > There are probably a few more places that need to be patched. > > In particular, take a look at lib/Target/ARM. There are things like > computeTargetABI and isTargetHardFloat that probably need to be > updated (and tested).

Re: [gentoo-musl] Re: Add support for musl-libc on Linux

2016-06-20 Thread Lei Zhang via cfe-commits
2016-06-20 17:37 GMT+08:00 Peter Smith : > Hello Lei, Hi, thanks for your reply! > I agree with Rafael that this is currently missing a few critical > things right now, especially in the llvm patch. > > My (limited) understanding of musl is that it intends to support the

Re: [gentoo-musl] Re: Add support for musl-libc on Linux

2016-06-17 Thread Lei Zhang via cfe-commits
2016-06-15 16:28 GMT+08:00 Lei Zhang : > Here's another patch including test cases for various non-x86 archs, > which should just work with my previous patches. ARM is left out > purposely since it involves extra complexity. I'll work on it later. Hi, Here are another

Re: [gentoo-musl] Re: Add support for musl-libc on Linux

2016-06-15 Thread Lei Zhang via cfe-commits
2016-06-14 20:55 GMT+08:00 Rafael Espíndola : > On 13 June 2016 at 21:07, Lei Zhang wrote: >> 2016-06-14 5:00 GMT+08:00 Rafael Espíndola : >>> Do you need someone to commit it for you? >> >> Yes, please :) > >

Re: [gentoo-musl] Re: Add support for musl-libc on Linux

2016-06-13 Thread Lei Zhang via cfe-commits
2016-06-14 5:00 GMT+08:00 Rafael Espíndola : > Do you need someone to commit it for you? Yes, please :) Lei ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [gentoo-musl] Re: Add support for musl-libc on Linux

2016-06-13 Thread Lei Zhang via cfe-commits
2016-06-13 21:21 GMT+08:00 Felix Janda : > [Added CC to the musl list] > > Lei Zhang wrote: >> 2016-06-13 3:07 GMT+08:00 Joerg Sonnenberger : >> > On Sun, Jun 12, 2016 at 10:51:11AM +0800, Lei Zhang via llvm-commits wrote: >> >> Hi, >> >> >> >> I'm replying to

Re: Add support for musl-libc on Linux

2016-06-13 Thread Lei Zhang via cfe-commits
2016-06-13 21:02 GMT+08:00 Rafael Espíndola : > Should musl really be an environment? What happens when targeting ARM, > do we get a gnueabi+musl? Is it used as an environment when > configuring gcc? Honestly I couldn't judge if musl *should* be an environment. But it

Re: Add support for musl-libc on Linux

2016-06-13 Thread Lei Zhang via cfe-commits
2016-06-13 3:07 GMT+08:00 Joerg Sonnenberger : > On Sun, Jun 12, 2016 at 10:51:11AM +0800, Lei Zhang via llvm-commits wrote: >> Hi, >> >> I'm replying to this thread; sorry I wasn't subscribed to the list, >> thus cannot reply to it directly. >> >>

Add support for musl-libc on Linux

2016-06-11 Thread Lei Zhang via cfe-commits
Hi, I'm replying to this thread; sorry I wasn't subscribed to the list, thus cannot reply to it directly. http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160606/161733.html Joerg, thanks for your reply. Could you please tell me what kind of test cases I should prepare? Thanks, Lei

Add support for musl-libc on Linux

2016-06-11 Thread Lei Zhang via cfe-commits
Hi, The first patch introduces musl as a new environment type in LLVM; the second helps clang to find musl's dynamic linker, which has a different naming scheme from glibc's. The two patches together enable clang to support targets like "x86_64-pc-linux-musl" and build binaries against musl-libc