LATX: extend EFLAGS reduction across TU calls and native patterns - #431
Draft
LaurenIsACoder wants to merge 7 commits into
Draft
LATX: extend EFLAGS reduction across TU calls and native patterns#431LaurenIsACoder wants to merge 7 commits into
LaurenIsACoder wants to merge 7 commits into
Conversation
Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
Signed-off-by: Hanlu Li <heuleehanlu@gmail.com>
LaurenIsACoder
force-pushed
the
lauren/spec2000-eflags-tu-pattern
branch
from
August 27, 2026 12:56
165d9da to
10151ef
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Design
LATX_EFLAGS_CROSS=0keeps the existing behavior andLATX_EFLAGS_CROSS=1enables the direct-call analysis. Callee decoding is bounded and analysis-only: temporary TBs do not enter the execution TU, HBR input, AOT TB set, thunk table, or translation metrics.The direct-call model assumes the normal ABI discipline that a near RET returns through the slot created by its matching direct CALL. Unknown and indirect control flow still requires all flags. Cross-page callees are intentionally excluded until AOT/SMC can record caller-to-callee page invalidation dependencies.
Pattern discovery runs before flag reduction. A consumer removes only the architectural EFLAGS reads replaced by its native translation; later consumers still preserve the corresponding producer flags. Locked memory operations and masked-zero shifts retain their ordinary EFLAGS paths.
Validation
origin/masteratd58864a036fRuntime movement was sensitive to AOT code layout in individual benchmarks, so this PR claims the verified EFLAGS/code-size reduction and leaves layout tuning to a separate follow-up.