Skip to content

OPcache: preserve constant and reusable expression assignment values - #24762

Closed
aasul wants to merge 2 commits into
php:PHP-8.4from
aasul:fix/gh24683-jit-cv-lifetime
Closed

aasul wants to merge 2 commits into
php:PHP-8.4from
aasul:fix/gh24683-jit-cv-lifetime

Conversation

@aasul

@aasul aasul commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Test PR

aasul added 2 commits October 26, 2026 22:36
Keep an identical typed constant as the result of assignment cleanup
branches instead of creating a PHI and a CV-bound COPY. A movable COPY
can otherwise spill the constant into the CV before the assignment's
guard, overwriting a value that the trace still needs.

Add the original constant-assignment regression from phpGH-24683.

Refs phpGH-24683.
Give pure-expression CV assignments their own hard COPY, including when
the existing conflict check rejects a binding. A later assignment must
not overwrite storage still needed by a reusable expression.

After optimized liveness and coalescing, share a checked bound COPY's
spill slot only when adjacent definitions have compatible types, the
COPY's ranges cover every later source range, neither interval was
coalesced or live before its definition, and no snapshot names the source.
Keep separate value identities and private source spills otherwise.

This avoids exhausting the fixed trace spill frame in safe reuse cases.
Add the original two-file C reproduction, a natural floating-point CSE
regression, and a test requiring successful compilation under pressure.

Refs phpGH-24683.
@aasul
aasul requested a review from dstogov as a code owner October 26, 2026 21:48
Copilot AI balanced review requested due to automatic review settings October 26, 2026 21:48

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants