[PATCH] D79515: [CUDA] Enable existing builtins for PTX7.0 as well.

2020-05-06 Thread Tim Shen via Phabricator via cfe-commits
timshen accepted this revision. timshen added inline comments. This revision is now accepted and ready to land. Comment at: clang/test/CodeGen/builtins-nvptx-ptx60.cu:6 // RUN: %clang_cc1 -triple nvptx64-unknown-unknown -target-cpu sm_80 \ -// RUN:-fcuda-is-device -t

[PATCH] D73237: [CUDA] Fix order of memcpy arguments in __shfl_*(<64-bit type>).

2020-01-23 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. What's the test situation for these headers? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D73237/new/ https://reviews.llvm.org/D73237 _

[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] 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] 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] 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] 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] 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] 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] 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] 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] 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
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-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-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: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-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] D41148: [libcxx] implement declarations based on P0214R7.

2018-04-23 Thread Tim Shen via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL330627: [libcxx] implement declarations based on P0214R7. (authored by timshen, committed by ). Herald added a subscriber: llvm-commits. Changed prior to commit: https://reviews.llvm

[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

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

2018-04-06 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 141436. timshen marked an inline comment as done. timshen added a comment. Update file comments copy-paste error. https://reviews.llvm.org/D41148 Files: libcxx/include/experimental/__config libcxx/include/experimental/simd libcxx/include/module.module

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

2018-04-05 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 141189. timshen added a comment. Also optimize -O0 load and stores by using memcpy. https://reviews.llvm.org/D44659 Files: libcxx/include/experimental/simd libcxx/test/std/experimental/simd/simd.elementwise/operators.pass.cpp Index: libcxx/test/std/exp

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

2018-04-05 Thread Tim Shen via Phabricator via cfe-commits
timshen marked 5 inline comments as done. timshen added inline comments. Comment at: libcxx/test/std/experimental/simd/simd.traits/is_simd_mask.pass.cpp:68 + +static_assert(!is_simd_mask::value, ""); + mclow.lists wrote: > How about a couple more negative tests

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

2018-04-05 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 141188. timshen added a comment. Addressed comments. https://reviews.llvm.org/D41148 Files: libcxx/include/experimental/__config libcxx/include/experimental/simd libcxx/include/module.modulemap libcxx/test/libcxx/double_include.sh.cpp libcxx/test/

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

2018-03-21 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 139393. timshen marked 7 inline comments as done. timshen added a comment. Address comments. https://reviews.llvm.org/D41148 Files: libcxx/include/experimental/__config libcxx/include/experimental/simd libcxx/test/std/experimental/simd/nothing_to_do.p

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

2018-03-21 Thread Tim Shen via Phabricator via cfe-commits
timshen added inline comments. Comment at: libcxx/include/experimental/simd:669 + +#if _LIBCPP_STD_VER > 14 && !defined(_LIBCPP_HAS_NO_VARIABLE_TEMPLATES) +template mclow.lists wrote: > Isn't the parallelism TS based on C++17? > I intended to have a C++11 (and

[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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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-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: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: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] D42510: [libcxx] Always allow temporary binding when __reference_binds_to_temporary doesn't exist

2018-01-24 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. timshen added reviewers: EricWF, rsmith. Herald added a subscriber: sanjoy. This is a follow-up to https://reviews.llvm.org/D41977. https://reviews.llvm.org/D42510 Files: libcxx/include/tuple Index: libcxx/include/tuple

[PATCH] D41977: [libc++] Fix PR20855 -- libc++ incorrectly diagnoses illegal reference binding in std::tuple.

2018-01-24 Thread Tim Shen via Phabricator via cfe-commits
timshen added a comment. Created https://reviews.llvm.org/D42510 for discussion. I'm not sure if it's a good idea, though. Repository: rCXX libc++ https://reviews.llvm.org/D41977 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lis

[PATCH] D41977: [libc++] Fix PR20855 -- libc++ incorrectly diagnoses illegal reference binding in std::tuple.

2018-01-24 Thread Tim Shen via Phabricator via cfe-commits
timshen added a comment. `__can_bind_reference()` doesn't return anything when __reference_binds_to_temporary doesn't exist. This causes builds break with old compilers. Should it just return true if __reference_binds_to_temporary doesn't exist? Repository: rCXX libc++ https://reviews.llvm

[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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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] 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 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 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] 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] 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-13 Thread Tim Shen via Phabricator via cfe-commits
timshen marked 4 inline comments as done. timshen added inline comments. Comment at: libcxx/include/experimental/simd:1069 +std::is_same<_Abi, simd_abi::fixed_size>::value && +__is_non_narrowing_convertible<_Up, _Tp>()>::type> + simd(const simd<_U

[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 126813. timshen added a comment. Address comments: - Generator ctor is implementable - Format issues of tests - SFINAE on __is_non_narrowing_convertible for arithmetics only. https://reviews.llvm.org/D41148 Files: libcxx/include/experimental/simd libcx

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

2017-12-12 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. timshen added a reviewer: mclow.lists. Herald added a subscriber: sanjoy. Herald added a reviewer: EricWF. The patch includes all declarations, and also implements the following features: - ABI. - narrowing-conversion related SFIANE, including simd<> ctors and (sta

[PATCH] D39308: [libcxx] Keep track of heap allocated regex states

2017-10-27 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 120711. timshen added a comment. Remove the uses of variadic template and auto. I'm not sure of how to implement this without a ABI change (the addition of __storage_). https://reviews.llvm.org/D39308 Files: libcxx/include/regex Index: libcxx/include/r

[PATCH] D39308: [libcxx] Keep track of heap allocated regex states

2017-10-26 Thread Tim Shen via Phabricator via cfe-commits
timshen added a comment. In https://reviews.llvm.org/D39308#907424, @mclow.lists wrote: > A couple of notes. Sorry for the oversights, when a C++11(-only :) contributor doesn't care about ABI stability, nor exceptions, he contributes naive code. :P I'll fix them. > - This change means that n

[PATCH] D39308: [libcxx] Keep track of heap allocated regex states

2017-10-25 Thread Tim Shen via Phabricator via cfe-commits
timshen updated this revision to Diff 120334. timshen added a comment. Add an assertion to __push. https://reviews.llvm.org/D39308 Files: libcxx/include/regex Index: libcxx/include/regex === --- libcxx/include/regex +++ libcxx/i

[PATCH] D39308: [libcxx] Keep track of heap allocated regex states

2017-10-25 Thread Tim Shen via Phabricator via cfe-commits
timshen created this revision. Herald added a subscriber: sanjoy. Herald added a reviewer: EricWF. Build abstraction on regex's allocation This fixes a fuzzer crasher from a huge input (provided by Marshall), which seems to be a stackoverflow during destruction. However, I can't reproduce Marsh

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

  1   2   >