Skip to content

[JSC] Fold MakeRope's constant part more #47158

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

Constellation
Copy link
Member

@Constellation Constellation commented Jun 25, 2025

@Constellation Constellation requested a review from a team as a code owner June 25, 2025 03:09
@Constellation Constellation self-assigned this Jun 25, 2025
@Constellation Constellation added the JavaScriptCore For bugs in JavaScriptCore, the JS engine used by WebKit, other than kxmlcore issues. label Jun 25, 2025
Copy link
Contributor

@hyjorc1 hyjorc1 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, we can add this to the commit message for better clarity.

This folds adjacent constant strings to reduce rope depth, simplify the IR, and improve runtime performance by avoiding unnecessary string concatenation.

@Constellation Constellation added the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Jun 26, 2025
@webkit-commit-queue webkit-commit-queue force-pushed the eng/JSC-Fold-MakeRope-s-constant-part-more branch from 2aa2a3c to fcacd3b Compare June 26, 2025 13:55
https://bugs.webkit.org/show_bug.cgi?id=294947
rdar://154254102

Reviewed by Yijia Huang.

Let's fold some part of MakeRope like,

    MakeRope(constant, constant, value) => MakeRope(constant, value)
    MakeRope(value, constant, constant) => MakeRope(value, constant)
    MakeRope(constant) => constant

* Source/JavaScriptCore/dfg/DFGStrengthReductionPhase.cpp:
(JSC::DFG::StrengthReductionPhase::handleNode):

Canonical link: https://commits.webkit.org/296662@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/JSC-Fold-MakeRope-s-constant-part-more branch from fcacd3b to b4e75f7 Compare June 26, 2025 13:57
@webkit-commit-queue
Copy link
Collaborator

Committed 296662@main (b4e75f7): https://commits.webkit.org/296662@main

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

@webkit-commit-queue webkit-commit-queue merged commit b4e75f7 into WebKit:main Jun 26, 2025
@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 26, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JavaScriptCore For bugs in JavaScriptCore, the JS engine used by WebKit, other than kxmlcore issues.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants