[clang] [clang] Provide an SSE4.2 implementation of identifier token lexer (PR #68962)

2023-10-19 Thread via cfe-commits
https://github.com/serge-sans-paille closed https://github.com/llvm/llvm-project/pull/68962 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Provide an SSE4.2 implementation of identifier token lexer (PR #68962)

2023-10-19 Thread Timm Baeder via cfe-commits
https://github.com/tbaederr approved this pull request. LGTM then https://github.com/llvm/llvm-project/pull/68962 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Provide an SSE4.2 implementation of identifier token lexer (PR #68962)

2023-10-18 Thread Aaron Ballman via cfe-commits
AaronBallman wrote: > @serge-sans-paille I'm still trying to understand whether this change will be > tested by CI - or at all. SSE4 is not enabled by default and i don't think > our cmake does that either - I did ping @AaronBallman and we are still > thinking about it I think we're in good

[clang] [clang] Provide an SSE4.2 implementation of identifier token lexer (PR #68962)

2023-10-17 Thread via cfe-commits
serge-sans-paille wrote: ok. I obviously tested on my setup, but having consistent testing is important. Thanks for the quick answer! https://github.com/llvm/llvm-project/pull/68962 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Provide an SSE4.2 implementation of identifier token lexer (PR #68962)

2023-10-17 Thread via cfe-commits
cor3ntin wrote: @serge-sans-paille I'm still trying to understand whether this change will be tested by CI - or at all. SSE4 is not enabled by default and i don't think our cmake does that either - I did ping @AaronBallman and we are still thinking about it

[clang] [clang] Provide an SSE4.2 implementation of identifier token lexer (PR #68962)

2023-10-17 Thread via cfe-commits
serge-sans-paille wrote: @tbaederr / @cor3ntin Do I have your formal approval to merge this? https://github.com/llvm/llvm-project/pull/68962 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Provide an SSE4.2 implementation of identifier token lexer (PR #68962)

2023-10-13 Thread via cfe-commits
https://github.com/serge-sans-paille updated https://github.com/llvm/llvm-project/pull/68962 >From ccf33cafada526241a3fb1aca9c2d280444b589b Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Thu, 12 Oct 2023 22:30:30 +0200 Subject: [PATCH 1/3] [clang] Provide an SSE4.2 implementation of

[clang] [clang] Provide an SSE4.2 implementation of identifier token lexer (PR #68962)

2023-10-13 Thread via cfe-commits
@@ -1847,19 +1851,46 @@ bool Lexer::LexUnicodeIdentifierStart(Token , uint32_t C, return true; } +static const char *fastParseASCIIIdentifier(const char *CurPtr, const char* BufferEnd) { +#ifdef __SSE4_2__ + static constexpr char AsciiIdentifierRange[16] = { + '_',

[clang] [clang] Provide an SSE4.2 implementation of identifier token lexer (PR #68962)

2023-10-13 Thread via cfe-commits
https://github.com/serge-sans-paille updated https://github.com/llvm/llvm-project/pull/68962 >From ccf33cafada526241a3fb1aca9c2d280444b589b Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Thu, 12 Oct 2023 22:30:30 +0200 Subject: [PATCH 1/2] [clang] Provide an SSE4.2 implementation of

[clang] [clang] Provide an SSE4.2 implementation of identifier token lexer (PR #68962)

2023-10-13 Thread Timm Baeder via cfe-commits
@@ -1847,19 +1851,46 @@ bool Lexer::LexUnicodeIdentifierStart(Token , uint32_t C, return true; } +static const char *fastParseASCIIIdentifier(const char *CurPtr, const char* BufferEnd) { +#ifdef __SSE4_2__ + static constexpr char AsciiIdentifierRange[16] = { + '_',

[clang] [clang] Provide an SSE4.2 implementation of identifier token lexer (PR #68962)

2023-10-13 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 9a8ff346bb20a684e8edd62035077aba06bea084 ccf33cafada526241a3fb1aca9c2d280444b589b --

[clang] [clang] Provide an SSE4.2 implementation of identifier token lexer (PR #68962)

2023-10-13 Thread via cfe-commits
https://github.com/cor3ntin commented: This is pretty neat. I'm wondering if this change would be tested by any of our bots? https://github.com/llvm/llvm-project/pull/68962 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang] Provide an SSE4.2 implementation of identifier token lexer (PR #68962)

2023-10-13 Thread via cfe-commits
@@ -1847,19 +1851,46 @@ bool Lexer::LexUnicodeIdentifierStart(Token , uint32_t C, return true; } +static const char *fastParseASCIIIdentifier(const char *CurPtr, const char* BufferEnd) { cor3ntin wrote: ```suggestion static const char

[clang] [clang] Provide an SSE4.2 implementation of identifier token lexer (PR #68962)

2023-10-13 Thread via cfe-commits
https://github.com/cor3ntin edited https://github.com/llvm/llvm-project/pull/68962 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Provide an SSE4.2 implementation of identifier token lexer (PR #68962)

2023-10-13 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang Author: None (serge-sans-paille) Changes The _mm_cmpistri instruction can be used to quickly parse identifiers. With this patch activated, clang pre-processes iostream 1.8% faster, and sqlite3.c amalgametion 1.5% faster, based on time

[clang] [clang] Provide an SSE4.2 implementation of identifier token lexer (PR #68962)

2023-10-13 Thread via cfe-commits
https://github.com/serge-sans-paille created https://github.com/llvm/llvm-project/pull/68962 The _mm_cmpistri instruction can be used to quickly parse identifiers. With this patch activated, clang pre-processes 1.8% faster, and sqlite3.c amalgametion 1.5% faster, based on time measurements