Skip to content

[WTF] Introduce SIMD::find helper to simplify vectorized search code#29445

Merged
webkit-commit-queue merged 1 commit into
WebKit:mainfrom
Constellation:eng/WTF-Introduce-SIMDfind-helper-to-simplify-vectorized-search-code
Jun 3, 2024
Merged

[WTF] Introduce SIMD::find helper to simplify vectorized search code#29445
webkit-commit-queue merged 1 commit into
WebKit:mainfrom
Constellation:eng/WTF-Introduce-SIMDfind-helper-to-simplify-vectorized-search-code

Conversation

@Constellation
Copy link
Copy Markdown
Member

@Constellation Constellation commented Jun 3, 2024

b5e7baa

[WTF] Introduce SIMD::find helper to simplify vectorized search code
https://bugs.webkit.org/show_bug.cgi?id=275044
rdar://129149147

Reviewed by Justin Michaud.

We simplify vectorized finding code by introducing a helper function SIMD::find, which extracts the common pattern in SIMD finding code.

* Source/JavaScriptCore/runtime/LiteralParser.cpp:
(JSC::LiteralParser<CharType>::Lexer::lexString):
* Source/WTF/wtf/SIMDHelpers.h:
(WTF::SIMD::find):
* Source/WTF/wtf/text/StringCommon.h:
(WTF::findImpl):
* Source/WebCore/html/parser/HTMLDocumentParserFastPath.cpp:
(WebCore::HTMLFastPathParser::scanText):
(WebCore::HTMLFastPathParser::scanAttributeValue):

Canonical link: https://commits.webkit.org/279658@main

43a8767

Misc iOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 wincairo
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 ✅ 🧪 wincairo-tests
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
✅ 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🛠 wpe-cairo
✅ 🛠 🧪 jsc ✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🛠 gtk
✅ 🛠 🧪 jsc-arm64 ✅ 🛠 tv ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 tv-sim ✅ 🧪 mac-wk2-stress ✅ 🧪 api-gtk
✅ 🛠 watch ✅ 🛠 jsc-armv7
✅ 🛠 🧪 unsafe-merge ✅ 🛠 watch-sim ✅ 🧪 jsc-armv7-tests

@Constellation Constellation requested review from a team, cdumez and rniwa as code owners June 3, 2024 06:40
@Constellation Constellation self-assigned this Jun 3, 2024
@Constellation Constellation force-pushed the eng/WTF-Introduce-SIMDfind-helper-to-simplify-vectorized-search-code branch from ec8300e to 5665a00 Compare June 3, 2024 06:42
@Constellation Constellation force-pushed the eng/WTF-Introduce-SIMDfind-helper-to-simplify-vectorized-search-code branch from 5665a00 to f8a1e05 Compare June 3, 2024 06:44
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Jun 3, 2024
@Constellation Constellation removed the merging-blocked Applied to prevent a change from being merged label Jun 3, 2024
@Constellation Constellation force-pushed the eng/WTF-Introduce-SIMDfind-helper-to-simplify-vectorized-search-code branch from f8a1e05 to 1c13489 Compare June 3, 2024 06:49
@Constellation Constellation force-pushed the eng/WTF-Introduce-SIMDfind-helper-to-simplify-vectorized-search-code branch from 1c13489 to 43a8767 Compare June 3, 2024 07:37
Copy link
Copy Markdown
Contributor

@justinmichaud justinmichaud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me

@Constellation Constellation added the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Jun 3, 2024
@webkit-commit-queue webkit-commit-queue force-pushed the eng/WTF-Introduce-SIMDfind-helper-to-simplify-vectorized-search-code branch from 43a8767 to dc6cd00 Compare June 3, 2024 16:45
https://bugs.webkit.org/show_bug.cgi?id=275044
rdar://129149147

Reviewed by Justin Michaud.

We simplify vectorized finding code by introducing a helper function SIMD::find, which extracts the common pattern in SIMD finding code.

* Source/JavaScriptCore/runtime/LiteralParser.cpp:
(JSC::LiteralParser<CharType>::Lexer::lexString):
* Source/WTF/wtf/SIMDHelpers.h:
(WTF::SIMD::find):
* Source/WTF/wtf/text/StringCommon.h:
(WTF::findImpl):
* Source/WebCore/html/parser/HTMLDocumentParserFastPath.cpp:
(WebCore::HTMLFastPathParser::scanText):
(WebCore::HTMLFastPathParser::scanAttributeValue):

Canonical link: https://commits.webkit.org/279658@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/WTF-Introduce-SIMDfind-helper-to-simplify-vectorized-search-code branch from dc6cd00 to b5e7baa Compare June 3, 2024 16:47
@webkit-commit-queue
Copy link
Copy Markdown
Collaborator

Committed 279658@main (b5e7baa): https://commits.webkit.org/279658@main

Reviewed commits have been landed. Closing PR #29445 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit b5e7baa into WebKit:main Jun 3, 2024
@webkit-commit-queue webkit-commit-queue removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Jun 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants