[PATCH] D50534: [libc++] Fix handling of negated character classes in regex

2018-08-09 Thread Tim Shen via Phabricator via cfe-commits
timshen added a comment. I'm not fully equipped with the context right now, but something doesn't add up. if `__neg_chars_.empty()` check is removed, the `(__neg_mask_ == 0)` above should be removed too. They have to be consistent. However, there is more weirdness in it. The comment above descr

[PATCH] D50534: [libc++] Fix handling of negated character classes in regex

2018-08-10 Thread Tim Shen via Phabricator via cfe-commits
timshen accepted this revision. timshen added a comment. This revision is now accepted and ready to land. That looks more correct to me, thanks! Although I'm still puzzled by the empty check at all, it's clearly an improvement. Repository: rCXX libc++ https://reviews.llvm.org/D50534 _

[PATCH] D41376: [libcxx] Implement ABI for Clang/GCC vector extension, constructors, copy_from and copy_to.

2018-05-22 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 148062. timshen added a comment. Herald added a subscriber: bixia. Chatted with Marshall a bit, we thought that it's bad for toolchain portability to support a C++17 library in C++11, especially with modifications w.r.t std::plus<>. Remove the backport of s

[PATCH] D39066: [libcxx] Fix signed overflow when constructing integers from brace expressions.

2017-10-18 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. Herald added a subscriber: sanjoy. Herald added a reviewer: EricWF. This should unblock PR24411. https://reviews.llvm.org/D39066 Files: libcxx/include/regex libcxx/test/std/re/re.grammar/excessive_brace_count.pass.cpp Index: libcxx/test/std/re/re.grammar/exc

[PATCH] D39162: [test] Fix clang-test for FreeBSD and NetBSD

2017-10-23 Thread Tim Shen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL316411: [test] Fix clang-test for FreeBSD and NetBSD (authored by timshen). Changed prior to commit: https://reviews.llvm.org/D39162?vs=119803&id=119995#toc Repository: rL LLVM https://reviews.llvm.

[PATCH] D51354: Fix the -print-multi-directory flag to print the selected multilib.

2018-09-04 Thread Tim Shen via Phabricator via cfe-commits
timshen added a comment. > The test fails on my system like so: I also observed the same failure. Bots also fail: http://lab.llvm.org:8011/builders/clang-x86_64-linux-selfhost-modules/builds/19509/steps/check-all/logs/FAIL%3A%20Clang%3A%3Aprint-multi-directory.c I'm going to revert this patch.

[PATCH] D41376: [libcxx] Implement ABI for Clang/GCC vector extension, constructors, copy_from and copy_to.

2018-07-27 Thread Tim Shen via Phabricator via cfe-commits
timshen added inline comments. Comment at: libcxx/include/experimental/simd:726 +#if defined(_LIBCPP_COMPILER_CLANG) +#define _SPECIALIZE_VEC_EXT(_TYPE, _NUM_ELEMENT) \ + template <>

[PATCH] D41376: [libcxx] Implement ABI for Clang/GCC vector extension, constructors, copy_from and copy_to.

2018-07-27 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 157751. timshen marked 6 inline comments as done. timshen added a comment. Update based on the comments. https://reviews.llvm.org/D41376 Files: libcxx/include/__config libcxx/include/experimental/__config libcxx/include/experimental/simd libcxx/test

[PATCH] D41376: [libcxx] Implement ABI for Clang/GCC vector extension, constructors, copy_from and copy_to.

2018-07-27 Thread Tim Shen via Phabricator via cfe-commits
timshen added a comment. I'm not going to rebase all the succeeding patches immediately onto this one, as it is painful and spamming emails. Rather, I'll only rebase the next patch in the line. So if you review more than one patch ahead (as you already did), you may see some stale patch context

[PATCH] D41376: [libcxx] Implement ABI for Clang/GCC vector extension, constructors, copy_from and copy_to.

2018-07-27 Thread Tim Shen via Phabricator via cfe-commits
timshen added inline comments. Comment at: libcxx/include/experimental/simd:1341 // [simd.class] // TODO: implement simd template timshen wrote: > mclow.lists wrote: > > Is this TODO still necessary? > I think so, as some operations are still not implemented,

[PATCH] D41376: [libcxx] Implement ABI for Clang/GCC vector extension, constructors, copy_from and copy_to.

2018-07-30 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 158038. timshen marked 2 inline comments as done. timshen added a comment. Update based on comments. https://reviews.llvm.org/D41376 Files: libcxx/include/__config libcxx/include/experimental/__config libcxx/include/experimental/simd libcxx/test/std

[PATCH] D41376: [libcxx] Implement ABI for Clang/GCC vector extension, constructors, copy_from and copy_to.

2018-07-30 Thread Tim Shen via Phabricator via cfe-commits
timshen added inline comments. Comment at: libcxx/include/experimental/simd:703 +public: + _Tp __get(size_t __index) const { return (&__storage_)[__index]; }; + void __set(size_t __index, _Tp __val) { (&__storage_)[__index] = __val; } mclow.lists wrote: > Can t

[PATCH] D41376: [libcxx] Implement ABI for Clang/GCC vector extension, constructors, copy_from and copy_to.

2018-07-30 Thread Tim Shen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL338309: [libcxx] implement ABI for Clang/GCC vector extension, constructors… (authored by timshen, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://review

[PATCH] D41412: [libcxx] implement concat() and split()

2018-07-30 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 158092. timshen marked 2 inline comments as done. timshen edited the summary of this revision. timshen added a comment. Update based on comments. https://reviews.llvm.org/D41412 Files: libcxx/include/experimental/simd libcxx/test/std/experimental/simd/s

[PATCH] D41412: [libcxx] implement concat() and split()

2018-07-30 Thread Tim Shen via Phabricator via cfe-commits
timshen added a comment. A note on test cases: I only used simds ints to test split() and concat(), as both functions don't specialize on the element type, unlike the constructors. Comment at: libcxx/include/experimental/simd:1491 - template + template static constexp

[PATCH] D42983: [clang-tidy] Add readability-simd-intrinsics check.

2018-02-06 Thread Tim Shen via Phabricator via cfe-commits
timshen added inline comments. Comment at: clang-tidy/readability/SIMDIntrinsicsCheck.cpp:22 + +static StringRef CheckPPC(StringRef Name) { + if (Name.startswith("vec_")) "Check" usually indicates to return a bool, but what it actually returns is a possible map

[PATCH] D42983: [clang-tidy] Add readability-simd-intrinsics check.

2018-02-06 Thread Tim Shen via Phabricator via cfe-commits
timshen added inline comments. Comment at: clang-tidy/readability/SIMDIntrinsicsCheck.cpp:24 + if (Name.startswith("vec_")) +Name = Name.substr(4); + else Can you either find or create a wrapper for this? bool StripPrefix(StringRef Prefix, StringRef& S)

[PATCH] D42983: [clang-tidy] Add readability-simd-intrinsics check.

2018-02-06 Thread Tim Shen via Phabricator via cfe-commits
timshen added inline comments. Comment at: clang-tidy/readability/SIMDIntrinsicsCheck.cpp:24 + if (Name.startswith("vec_")) +Name = Name.substr(4); + else timshen wrote: > Can you either find or create a wrapper for this? > > bool StripPrefix(StringRef P

[PATCH] D42983: [clang-tidy] Add readability-simd-intrinsics check.

2018-02-06 Thread Tim Shen via Phabricator via cfe-commits
timshen added inline comments. Comment at: clang-tidy/readability/SIMDIntrinsicsCheck.cpp:34 +// [simd.binary] +{"add", "std::experimental::simd::operator+"}, +{"sub", "std::experimental::simd::operator-"}, Technically, std::experimental::simd::operat

[PATCH] D42983: [clang-tidy] Add readability-simd-intrinsics check.

2018-02-07 Thread Tim Shen via Phabricator via cfe-commits
timshen added inline comments. Comment at: clang-tidy/readability/SIMDIntrinsicsCheck.cpp:75 + // libcxx implementation of std::experimental::simd requires at least C++11. + if (!Result.Context->getLangOpts().CPlusPlus11) +return; MaskRay wrote: > lebedev.r

[PATCH] D33525: [ThinLTO] Migrate ThinLTOBitcodeWriter to the new PM.

2017-05-24 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. Herald added subscribers: eraman, inglorion, Prazek, mehdi_amini. Also see https://reviews.llvm.org/D33429 for other ThinLTO + New PM related changes. https://reviews.llvm.org/D33525 Files: clang/lib/CodeGen/BackendUtil.cpp clang/test/CodeGen/thin_link_bitcod

[PATCH] D33525: [ThinLTO] Migrate ThinLTOBitcodeWriter to the new PM.

2017-05-24 Thread Tim Shen via Phabricator via cfe-commits
timshen added inline comments. Comment at: llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp:423 + +class AARGetter { + FunctionAnalysisManager &AM; mehdi_amini wrote: > Can't you do it with a lambda? I can, except that AAR needs to be allocated outside of the la

[PATCH] D33525: [ThinLTO] Migrate ThinLTOBitcodeWriter to the new PM.

2017-05-25 Thread Tim Shen via Phabricator via cfe-commits
timshen added a comment. In https://reviews.llvm.org/D33525#764251, @chandlerc wrote: > (focusing on the LLVM side of this review for now) > > Can you add an LLVM-based test? Can you add this to > `lib/Passes/PassRegistry.def`? I see that not all passes are registered (BitcodeWriterPass). Is i

[PATCH] D33525: [ThinLTO] Migrate ThinLTOBitcodeWriter to the new PM.

2017-05-26 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 100462. timshen added a comment. Change the test case. https://reviews.llvm.org/D33525 Files: clang/lib/CodeGen/BackendUtil.cpp clang/test/CodeGen/thin_link_bitcode.c llvm/include/llvm/Transforms/IPO/ThinLTOBitcodeWriter.h llvm/lib/Transforms/IPO/Th

[PATCH] D33525: [ThinLTO] Migrate ThinLTOBitcodeWriter to the new PM.

2017-05-26 Thread Tim Shen via Phabricator via cfe-commits
timshen marked an inline comment as done. timshen added a comment. In https://reviews.llvm.org/D33525#764251, @chandlerc wrote: > (focusing on the LLVM side of this review for now) > > Can you add an LLVM-based test? Can you add this to > `lib/Passes/PassRegistry.def`? Talked offline. Given th

[PATCH] D33525: [ThinLTO] Migrate ThinLTOBitcodeWriter to the new PM.

2017-05-26 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 100488. timshen added a comment. Add opt support and llvm test. https://reviews.llvm.org/D33525 Files: clang/lib/CodeGen/BackendUtil.cpp clang/test/CodeGen/thin_link_bitcode.c llvm/include/llvm/Transforms/IPO/ThinLTOBitcodeWriter.h llvm/lib/Transfor

[PATCH] D33525: [ThinLTO] Migrate ThinLTOBitcodeWriter to the new PM.

2017-05-29 Thread Tim Shen via Phabricator via cfe-commits
timshen added inline comments. Comment at: llvm/test/Transforms/ThinLTOBitcodeWriter/new-pm.ll:1 +; RUN: opt -passes='lto' -debug-pass-manager -thinlto-bc -thin-link-bitcode-file=%t2 -o %t %s 2>&1 | FileCheck %s --check-prefix=DEBUG_PM +; RUN: llvm-bcanalyzer -dump %t2 | FileChe

[PATCH] D33525: [ThinLTO] Migrate ThinLTOBitcodeWriter to the new PM.

2017-05-30 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 100761. timshen marked 12 inline comments as done. timshen added a comment. Updated based on the comments, and left out Clang changes for a separate patch. https://reviews.llvm.org/D33525 Files: llvm/include/llvm/Transforms/IPO/ThinLTOBitcodeWriter.h ll

[PATCH] D33525: [ThinLTO] Migrate ThinLTOBitcodeWriter to the new PM.

2017-05-30 Thread Tim Shen via Phabricator via cfe-commits
timshen added inline comments. Comment at: llvm/lib/Transforms/IPO/ThinLTOBitcodeWriter.cpp:443 + writeThinLTOBitcode(OS, ThinLinkOS, + [&FAM](Function &F) -> AAResults & { +return FAM.getResult(F); chandlerc wrote: >

[PATCH] D33692: [ThinLTO] Migrate ThinLTOBitcodeWriter to the new PM.

2017-05-30 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. Herald added subscribers: inglorion, Prazek, mehdi_amini. Also see https://reviews.llvm.org/D33429 for other ThinLTO + New PM related changes. https://reviews.llvm.org/D33692 Files: clang/lib/CodeGen/BackendUtil.cpp clang/test/CodeGen/thin_link_bitcode.c In

[PATCH] D33692: [ThinLTO] Migrate ThinLTOBitcodeWriter to the new PM.

2017-06-01 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 101106. timshen added a comment. Rebase the patch onto https://reviews.llvm.org/D33799. https://reviews.llvm.org/D33692 Files: clang/lib/CodeGen/BackendUtil.cpp clang/test/CodeGen/thin_link_bitcode.c Index: clang/test/CodeGen/thin_link_bitcode.c =

[PATCH] D33692: [ThinLTO] Wire up ThinLTO and new PM

2017-06-01 Thread Tim Shen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL304496: [ThinLTO] Wire up ThinLTO and new PM (authored by timshen). Changed prior to commit: https://reviews.llvm.org/D33692?vs=101106&id=101135#toc Repository: rL LLVM https://reviews.llvm.org/D336

[PATCH] D41148: [libcxx] implement declarations based on P0214R7.

2017-12-13 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 126872. timshen marked 7 inline comments as done. timshen added a comment. Address second round of comments. https://reviews.llvm.org/D41148 Files: libcxx/include/experimental/__config libcxx/include/experimental/simd libcxx/test/std/experimental/simd

[PATCH] D41148: [libcxx] implement declarations based on P0214R7.

2017-12-13 Thread Tim Shen via Phabricator via cfe-commits
timshen added inline comments. Comment at: libcxx/include/experimental/simd:594 + +#warning " is under construction and not for practical use for now." + EricWF wrote: > I would just remove this. The `experimental` part of the name should say > enough. > > Als

[PATCH] D41148: [libcxx] implement declarations based on P0214R7.

2017-12-18 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 127399. timshen added a comment. Formatted the files. https://reviews.llvm.org/D41148 Files: libcxx/include/experimental/__config libcxx/include/experimental/simd libcxx/test/std/experimental/simd/nothing_to_do.pass.cpp libcxx/test/std/experimental/

[PATCH] D41376: [libcxx] Implement ABI for Clang/GCC vector extension, constructors, copy_from and copy_to.

2017-12-18 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. timshen added reviewers: mclow.lists, EricWF. Herald added a subscriber: sanjoy. This patch added a new macro _LIBCPP_HAS_VECTOR_EXTENSION for detecting whether a vector extension (__attribute__((vector_size(num_bytes is available. This patch also backports std:

[PATCH] D41376: [libcxx] Implement ABI for Clang/GCC vector extension, constructors, copy_from and copy_to.

2017-12-18 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 127453. timshen added a comment. Update description. https://reviews.llvm.org/D41376 Files: libcxx/include/__config libcxx/include/experimental/__config libcxx/include/experimental/simd libcxx/include/utility libcxx/test/std/experimental/simd/simd

[PATCH] D41376: [libcxx] Implement ABI for Clang/GCC vector extension, constructors, copy_from and copy_to.

2017-12-18 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 127455. timshen added a comment. Fix reference's access control. https://reviews.llvm.org/D41376 Files: libcxx/include/__config libcxx/include/experimental/__config libcxx/include/experimental/simd libcxx/include/utility libcxx/test/std/experiment

[PATCH] D41376: [libcxx] Implement ABI for Clang/GCC vector extension, constructors, copy_from and copy_to.

2017-12-18 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 127458. timshen added a comment. Fix return type of reference::opreator--. https://reviews.llvm.org/D41376 Files: libcxx/include/__config libcxx/include/experimental/__config libcxx/include/experimental/simd libcxx/include/utility libcxx/test/std/

[PATCH] D41412: [libcxx] implement concat() and split()

2017-12-19 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. timshen added reviewers: mclow.lists, EricWF. Herald added a subscriber: sanjoy. This patch implements the extended version (see P0820) of P0214 concat() and split(). https://reviews.llvm.org/D41412 Files: libcxx/include/experimental/simd libcxx/test/std/exper

[PATCH] D41415: [libcxx] implement casts.

2017-12-19 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. timshen added reviewers: mclow.lists, EricWF. Herald added a subscriber: sanjoy. This patch also changed all simd size-related types to size_t. Before the change, as P0214 proposed, they are half-int, half-size_t in different places. The inconsistency of size types c

[PATCH] D41148: [libcxx] implement declarations based on P0214R7.

2017-12-19 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 127622. timshen added a comment. include "test_macros.h" in the tests https://reviews.llvm.org/D41148 Files: libcxx/include/experimental/__config libcxx/include/experimental/simd libcxx/test/std/experimental/simd/nothing_to_do.pass.cpp libcxx/test/s

[PATCH] D41422: [libcxx] implement operators and reduction.

2017-12-19 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. timshen added reviewers: mclow.lists, EricWF. Herald added a subscriber: sanjoy. This patch completes the implementation of simd<> and related operations. https://reviews.llvm.org/D41422 Files: libcxx/include/experimental/simd libcxx/test/std/experimental/simd

[PATCH] D41376: [libcxx] Implement ABI for Clang/GCC vector extension, constructors, copy_from and copy_to.

2017-12-19 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 127638. timshen added a comment. s/_LIBCPP_HAS_VECTOR_EXTENSION/_LIBCPP_HAS_NO_VECTOR_EXTENSION/ https://reviews.llvm.org/D41376 Files: libcxx/include/__config libcxx/include/experimental/__config libcxx/include/experimental/simd libcxx/include/util

[PATCH] D41415: [libcxx] implement casts.

2017-12-19 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 127639. timshen added a comment. s/_LIBCPP_HAS_VECTOR_EXTENSION/_LIBCPP_HAS_NO_VECTOR_EXTENSION/ https://reviews.llvm.org/D41415 Files: libcxx/include/experimental/simd libcxx/test/std/experimental/simd/simd.casts/simd_cast.pass.cpp libcxx/test/std/ex

[PATCH] D41386: [libunwind][PPC64] Port to ppc64le - initial version

2018-01-02 Thread Tim Shen via Phabricator via cfe-commits
timshen added a comment. The static_assert on line 1189 fails with the following build on x86: cmake -GNinja -DLIBUNWIND_ENABLE_CROSS_UNWINDING=ON -DLLVM_PATH=$PATH_TO_LLVM $PATH_TO_LIBUNWIND && ninja libunwind.a It seems that 136 in `# define _LIBUNWIND_CONTEXT_SIZE 136` is too small. Rever

[PATCH] D41386: [libunwind][PPC64] Port to ppc64le - initial version

2018-01-02 Thread Tim Shen via Phabricator via cfe-commits
timshen added a comment. In https://reviews.llvm.org/D41386#966189, @mstorsjo wrote: > In https://reviews.llvm.org/D41386#966187, @timshen wrote: > > > The static_assert on line 1189 fails with the following build on x86: > > > > cmake -GNinja -DLIBUNWIND_ENABLE_CROSS_UNWINDING=ON > > -DLLVM_P

[PATCH] D41148: [libcxx] implement declarations based on P0214R7.

2018-01-04 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 128679. timshen added a comment. Rebase. https://reviews.llvm.org/D41148 Files: libcxx/include/experimental/__config libcxx/include/experimental/simd libcxx/test/std/experimental/simd/nothing_to_do.pass.cpp libcxx/test/std/experimental/simd/simd.cas

[PATCH] D41376: [libcxx] Implement ABI for Clang/GCC vector extension, constructors, copy_from and copy_to.

2018-01-04 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 128680. timshen added a comment. Rebase. Also modify the simd reference implementation to separate the stored type and value_type (which could be bool later). https://reviews.llvm.org/D41376 Files: libcxx/include/__config libcxx/include/experimental/__

[PATCH] D41747: [libcxx] implement simd_mask<> and operators.

2018-01-04 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. timshen added reviewers: mclow.lists, EricWF. Herald added a subscriber: sanjoy. simd_mask stores a simd, where U has the same length of T, but is an unsigned integer. Then all functionality of simd_mask can be implemented in terms of simd. For reference, Vc seems

[PATCH] D41747: [libcxx] implement simd_mask<> and operators.

2018-01-04 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 128687. timshen added a comment. Remove unintended binary file. https://reviews.llvm.org/D41747 Files: libcxx/include/experimental/simd libcxx/test/std/experimental/simd/simd.elementwise/operators.pass.cpp libcxx/test/std/experimental/simd/simd.mask.a

[PATCH] D41756: [libcxx] implement simd_mask<> casts and some horizontal operations.

2018-01-04 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. timshen added reviewers: mclow.lists, EricWF. Herald added a subscriber: sanjoy. popcount is implemented in terms of for loop. On x86, it can be specialized to _mm_movemask_* + __builtin_popcountll() in the future. https://reviews.llvm.org/D41756 Files: libcxx/

[PATCH] D41756: [libcxx] implement simd_mask<> casts and some horizontal operations.

2018-01-04 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 128706. timshen added a comment. Add tests to boolean version of the horizontal operations. https://reviews.llvm.org/D41756 Files: libcxx/include/experimental/simd libcxx/test/std/experimental/simd/simd.casts/to_compatible.pass.cpp libcxx/test/std/exp

[PATCH] D41843: [libcxx] implement where expressions.

2018-01-08 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. timshen added reviewers: mclow.lists, EricWF. Herald added a subscriber: sanjoy. Where expressions have three cases: *) const_where_expression, simd<...>>, we store two references to the mask and the simd<> value. *) const_where_expression, simd_mask<...>>, we store

[PATCH] D41844: [libcxx] implement mask reductions

2018-01-08 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. timshen added reviewers: mclow.lists, EricWF. Herald added a subscriber: sanjoy. This is not efficiently implemented typename V::value_type reduce(const const_where_expression &x, typename V::value_type neutral_element, BinaryOperation binary_op); as w

[PATCH] D41845: [libcxx] clean up and complete

2018-01-08 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. timshen added reviewers: mclow.lists, EricWF. Herald added a subscriber: sanjoy. The cleanup patch adds sevreal TODOs for the following unimplemented features: *) aligned load *) simd<> version of functions This patch declares the completion of my implementation of

[PATCH] D41845: [libcxx] clean up and complete

2018-01-08 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 129006. timshen added a comment. Implement memory_alignment. https://reviews.llvm.org/D41845 Files: libcxx/include/experimental/simd Index: libcxx/include/experimental/simd === --- libcxx/in

[PATCH] D41376: [libcxx] Implement ABI for Clang/GCC vector extension, constructors, copy_from and copy_to.

2018-01-08 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 129008. timshen added a comment. Rebased. https://reviews.llvm.org/D41376 Files: libcxx/include/__config libcxx/include/experimental/__config libcxx/include/experimental/simd libcxx/include/utility libcxx/test/std/experimental/simd/simd.abi/vector

[PATCH] D41412: [libcxx] implement concat() and split()

2018-01-08 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 129009. timshen added a comment. Rebased. https://reviews.llvm.org/D41412 Files: libcxx/include/experimental/simd libcxx/test/std/experimental/simd/simd.horizontal/concat.pass.cpp libcxx/test/std/experimental/simd/simd.horizontal/split.pass.cpp Index

[PATCH] D41148: [libcxx] implement declarations based on P0214R7.

2018-01-08 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 129007. timshen added a comment. Rebased. https://reviews.llvm.org/D41148 Files: libcxx/include/experimental/__config libcxx/include/experimental/simd libcxx/test/std/experimental/simd/nothing_to_do.pass.cpp libcxx/test/std/experimental/simd/simd.ca

[PATCH] D41415: [libcxx] implement casts.

2018-01-08 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 129010. timshen added a comment. Rebased. https://reviews.llvm.org/D41415 Files: libcxx/include/experimental/simd libcxx/test/std/experimental/simd/simd.casts/simd_cast.pass.cpp libcxx/test/std/experimental/simd/simd.casts/static_simd_cast.pass.cpp

[PATCH] D41747: [libcxx] implement simd_mask<> and operators.

2018-01-08 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 129012. timshen added a comment. Rebased. https://reviews.llvm.org/D41747 Files: libcxx/include/experimental/simd libcxx/test/std/experimental/simd/simd.elementwise/operators.pass.cpp libcxx/test/std/experimental/simd/simd.mask.access/default.pass.cpp

[PATCH] D41422: [libcxx] implement operators and reduction.

2018-01-08 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 129011. timshen added a comment. Rebased. https://reviews.llvm.org/D41422 Files: libcxx/include/experimental/simd libcxx/test/std/experimental/simd/simd.elementwise/clamp.pass.cpp libcxx/test/std/experimental/simd/simd.elementwise/max.pass.cpp libcx

[PATCH] D41756: [libcxx] implement simd_mask<> casts and some horizontal operations.

2018-01-08 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 129013. timshen added a comment. Rebased. https://reviews.llvm.org/D41756 Files: libcxx/include/experimental/simd libcxx/test/std/experimental/simd/simd.casts/to_compatible.pass.cpp libcxx/test/std/experimental/simd/simd.casts/to_fixed_size.pass.cpp

[PATCH] D41845: [libcxx] clean up and complete

2018-01-08 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 129017. timshen added a comment. Update on template variable #ifdefs in tests. https://reviews.llvm.org/D41845 Files: libcxx/include/experimental/simd libcxx/test/std/experimental/simd/simd.cons/load.pass.cpp libcxx/test/std/experimental/simd/simd.mas

[PATCH] D41148: [libcxx] implement declarations based on P0214R7.

2018-03-19 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 139036. timshen added a comment. Herald added a subscriber: christof. Rebase. https://reviews.llvm.org/D41148 Files: libcxx/include/experimental/__config libcxx/include/experimental/simd libcxx/test/std/experimental/simd/nothing_to_do.pass.cpp libcx

[PATCH] D41415: [libcxx] implement casts.

2018-03-19 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 139039. timshen added a comment. Herald added a subscriber: christof. Rebase. https://reviews.llvm.org/D41415 Files: libcxx/include/experimental/simd libcxx/test/std/experimental/simd/simd.casts/simd_cast.pass.cpp libcxx/test/std/experimental/simd/sim

[PATCH] D41376: [libcxx] Implement ABI for Clang/GCC vector extension, constructors, copy_from and copy_to.

2018-03-19 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 139037. timshen added a comment. Herald added a subscriber: christof. Rebase. https://reviews.llvm.org/D41376 Files: libcxx/include/__config libcxx/include/experimental/__config libcxx/include/experimental/simd libcxx/include/utility libcxx/test/s

[PATCH] D41412: [libcxx] implement concat() and split()

2018-03-19 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 139038. timshen added a comment. Herald added a subscriber: christof. Rebase. https://reviews.llvm.org/D41412 Files: libcxx/include/experimental/simd libcxx/test/std/experimental/simd/simd.horizontal/concat.pass.cpp libcxx/test/std/experimental/simd/s

[PATCH] D41747: [libcxx] implement simd_mask<> and operators.

2018-03-19 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 139041. timshen added a comment. Herald added a subscriber: christof. Rebase. https://reviews.llvm.org/D41747 Files: libcxx/include/experimental/simd libcxx/test/std/experimental/simd/simd.elementwise/operators.pass.cpp libcxx/test/std/experimental/si

[PATCH] D41422: [libcxx] implement operators and reduction.

2018-03-19 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 139040. timshen added a comment. Herald added a subscriber: christof. Rebase. https://reviews.llvm.org/D41422 Files: libcxx/include/experimental/simd libcxx/test/std/experimental/simd/simd.elementwise/clamp.pass.cpp libcxx/test/std/experimental/simd/s

[PATCH] D41756: [libcxx] implement simd_mask<> casts and some horizontal operations.

2018-03-19 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 139042. timshen added a comment. Herald added a subscriber: christof. Rebase. https://reviews.llvm.org/D41756 Files: libcxx/include/experimental/simd libcxx/test/std/experimental/simd/simd.casts/to_compatible.pass.cpp libcxx/test/std/experimental/simd

[PATCH] D41844: [libcxx] implement mask reductions

2018-03-19 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 139044. timshen added a comment. Herald added a subscriber: christof. Rebase. https://reviews.llvm.org/D41844 Files: libcxx/include/experimental/simd libcxx/test/std/experimental/simd/simd.horizontal/hmax.pass.cpp libcxx/test/std/experimental/simd/sim

[PATCH] D41845: [libcxx] clean up and complete

2018-03-19 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 139045. timshen added a comment. Herald added a subscriber: christof. Rebase. https://reviews.llvm.org/D41845 Files: libcxx/include/experimental/simd libcxx/test/std/experimental/simd/simd.cons/load.pass.cpp libcxx/test/std/experimental/simd/simd.mask

[PATCH] D44656: [libcxx] Add conversions between underlying non-portable types and simd/simd_mask types.

2018-03-19 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. timshen added a reviewer: mclow.lists. Herald added subscribers: christof, kristof.beyls, sanjoy. Herald added a reviewer: EricWF. Currently x86, PowerPC, and ARM are supported. https://reviews.llvm.org/D44656 Files: libcxx/include/experimental/__config libcxx

[PATCH] D41843: [libcxx] implement where expressions.

2018-03-19 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 139043. timshen added a comment. Herald added a subscriber: christof. Rebase. https://reviews.llvm.org/D41843 Files: libcxx/include/experimental/simd libcxx/test/std/experimental/simd/simd.whereexpr/const_where_expression.pass.cpp libcxx/test/std/exp

[PATCH] D44657: [libcxx] fix a sanitizer-reported bug in

2018-03-19 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. timshen added a reviewer: mclow.lists. Herald added subscribers: christof, sanjoy. Herald added a reviewer: EricWF. Herald added a reviewer: EricWF. In __simd_reference, the conversion between bool and mask integer is in wrong place. https://reviews.llvm.org/D44657

[PATCH] D44658: [libcxx] Implement aligned load and store when compiled with Clang.

2018-03-19 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. timshen added a reviewer: mclow.lists. Herald added subscribers: christof, sanjoy. Herald added a reviewer: EricWF. Simply use __attribute__((align_value(...))). https://reviews.llvm.org/D44658 Files: libcxx/include/experimental/simd Index: libcxx/include/exper

[PATCH] D44662: [libcxx] In , optimize masked div and rem.

2018-03-19 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. timshen added a reviewer: mclow.lists. Herald added subscribers: christof, sanjoy. Herald added a reviewer: EricWF. This optimization is allowed by the semantics, as users shouldn't pass in values that may cause undefined behavior even those values are masked. http

[PATCH] D44661: [libcxx] optimize reduce(), hmin(), hmax() by reordering the operations.

2018-03-19 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. timshen added a reviewer: mclow.lists. Herald added subscribers: christof, sanjoy. Herald added a reviewer: EricWF. Also change std::plus<_Tp> to std::plus<>/__simd_plus_op, so that the optimization can transparently use the simd<> overloading. https://reviews.llvm

[PATCH] D44664: [libcxx] Add missing __simd_reference pieces based on R9.

2018-03-19 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. timshen added a reviewer: mclow.lists. Herald added subscribers: christof, sanjoy. Herald added a reviewer: EricWF. https://reviews.llvm.org/D44664 Files: libcxx/include/experimental/simd libcxx/test/std/experimental/simd/simd.access/default.pass.cpp libcxx/te

[PATCH] D44659: [libcxx] Optimize -O0 performance for operators

2018-03-19 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. timshen added a reviewer: mclow.lists. Herald added subscribers: christof, sanjoy. Herald added a reviewer: EricWF. When vector extension (__attribute__((vector_size(... is available use its operators, instead of generating loops of scalar operations. https://r

[PATCH] D44665: [libcxx] Update synopsis to P0214R9

2018-03-19 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. timshen added a reviewer: mclow.lists. Herald added subscribers: christof, sanjoy. Herald added a reviewer: EricWF. Herald added a reviewer: EricWF. https://reviews.llvm.org/D44665 Files: libcxx/include/experimental/simd libcxx/test/std/experimental/simd/simd.ac

[PATCH] D44660: [libcxx] unroll the loops in for Clang, until LLVM bugs are fixed

2018-03-19 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. timshen added a reviewer: mclow.lists. Herald added subscribers: christof, sanjoy. Herald added a reviewer: EricWF. https://reviews.llvm.org/D44660 Files: libcxx/include/experimental/simd Index: libcxx/include/experimental/simd ==

[PATCH] D44663: [libcxx] Update with R9 changes

2018-03-19 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. timshen added a reviewer: mclow.lists. Herald added subscribers: christof, sanjoy. Herald added a reviewer: EricWF. - change the uses of abi_for_size to simd_abi::deduce. - remove the const in const_where_expression's template. https://reviews.llvm.org/D44663 File

[PATCH] D60279: [CUDA] Implemented _[bi]mma* builtins.

2019-04-05 Thread Tim Shen via Phabricator via cfe-commits
timshen added inline comments. Comment at: clang/lib/CodeGen/CGBuiltin.cpp:12884 +// Helper classes for mapping MMA builtins to particular LLVM intrinsic variant. +class NVPTXMmaLdstInfo { +public: How about having a simple struct and a function? ``` struct Nvpt

[PATCH] D37955: [libcxx] Fix invert negative bracket match.

2017-09-16 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. Herald added a subscriber: sanjoy. Herald added a reviewer: EricWF. Ideally we want !(neg_mask || neg_char), aka (!neg_mask && !neg_char). Before the change, the code is (!neg_mask || !neg_char). This fixes PR34310. https://reviews.llvm.org/D37955 Files: libcx

[PATCH] D37955: [libcxx] Fix invert negative bracket match.

2017-09-16 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 115554. timshen added a comment. Remove "#include " in the test. It was for debugging. https://reviews.llvm.org/D37955 Files: libcxx/include/regex libcxx/test/std/re/re.alg/re.alg.search/invert_neg_word_search.pass.cpp Index: libcxx/test/std/re/re.alg

[PATCH] D37956: [libc++] Check back reference subscript overflow in a single place.

2017-09-16 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. Herald added a subscriber: sanjoy. Herald added a reviewer: EricWF. Currently it's checked in three places, including one place that's at regex runtime. There is no need to do runtime check, as all uses and definitions of subexpress is known at regex compile-time.

[PATCH] D37958: [libc++] Correctly propagate user-defined lookup_classname().

2017-09-17 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. Herald added a subscriber: sanjoy. Herald added a reviewer: EricWF. Always lookup the class name, even when the traits type is regex_traits<>. The lookup happens at regex compile time, so it shouldn't affect the performance. I also added ja_JP.UTF-8 as a common loc

[PATCH] D37958: [libc++] Correctly propagate user-defined lookup_classname().

2017-09-17 Thread Tim Shen via Phabricator via cfe-commits
timshen added a comment. I'm not sure if we need to change the CI server to suport ja_JP.UTF-8. https://reviews.llvm.org/D37958 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D37958: [libc++] Correctly propagate user-defined lookup_classname().

2017-09-17 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 115559. timshen added a comment. Update description. https://reviews.llvm.org/D37958 Files: libcxx/include/regex libcxx/test/std/re/re.traits/lookup_classname_user_defined.pass.cpp libcxx/utils/libcxx/test/target_info.py Index: libcxx/utils/libcxx/te

[PATCH] D37958: [libc++] Correctly propagate user-defined lookup_classname().

2017-09-17 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 115560. timshen added a comment. Stylize template decl to "template https://reviews.llvm.org/D37958 Files: libcxx/include/regex libcxx/test/std/re/re.traits/lookup_classname_user_defined.pass.cpp libcxx/utils/libcxx/test/target_info.py Index: libcxx/ut

[PATCH] D37958: [libc++] Correctly propagate user-defined lookup_classname().

2017-09-17 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 115597. timshen added a comment. Propagate __icase_ correctly into lookup_classname. https://reviews.llvm.org/D37958 Files: libcxx/include/regex libcxx/test/std/re/re.traits/lookup_classname_user_defined.pass.cpp libcxx/utils/libcxx/test/target_info.p

[PATCH] D37958: [libc++] Correctly propagate user-defined lookup_classname().

2017-09-17 Thread Tim Shen via Phabricator via cfe-commits
timshen added inline comments. Comment at: libcxx/test/std/re/re.traits/lookup_classname_user_defined.pass.cpp:46 +// matches all characters (they are classified as alnum) +std::wstring re1 = L"([[:alnum:]]+)"; +std::regex_search(in, m, std::wregex(re1)); ---

[PATCH] D38041: [libc++] Separate locale tests that are XFAIL on linux-gnu from others

2017-09-19 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. Herald added a subscriber: sanjoy. Herald added a reviewer: EricWF. The tests don't pass on linux-gnu. Move them out, so that the others don't have to be XFAIL. https://reviews.llvm.org/D38041 Files: libcxx/test/std/re/re.alg/re.alg.match/basic.pass.cpp libcxx

[PATCH] D37955: [libcxx] Fix invert negative bracket match.

2017-09-19 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 115851. timshen added a comment. Fixed. Those tests were XFAILing on linux-gnu. I also created https://reviews.llvm.org/D38041 to XFAIL only on the failing ones. https://reviews.llvm.org/D37955 Files: libcxx/include/regex libcxx/test/std/re/re.alg/re.

[PATCH] D41412: [libcxx] implement concat() and split()

2019-07-16 Thread Tim Shen via Phabricator via cfe-commits
timshen added a comment. In D41412#1586966 , @grosser wrote: > Hi @timshen, > > I am very interested in these patches. Any chance you can take up the > upstreaming process again? I'm glad to spend time upstreaming these patches. Now we just need a libc+

[PATCH] D41412: [libcxx] implement concat() and split()

2019-07-18 Thread Tim Shen via Phabricator via cfe-commits
timshen added a comment. Tobias, I spoke to @EricWF who is willing to take a look at all these patches. However, I don't know when exactly will the review starts. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D41412/new/ https://reviews.llvm.org/D41412 __

[PATCH] D41148: [libcxx] implement declarations based on P0214R7.

2018-04-23 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 143610. timshen added a comment. Update formatting on static_asserts. https://reviews.llvm.org/D41148 Files: libcxx/include/experimental/__config libcxx/include/experimental/simd libcxx/include/module.modulemap libcxx/test/libcxx/double_include.sh.c

  1   2   >