You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Medium Risk
Changes compiler bytecode layout and jump-offset accounting, but behavior should stay equivalent because zero stack ops are still removed earlier in the allocated-abstract pipeline; regressions would show up as wrong jumps or VM failures.
Overview
Removes redundant zero-size CFEI/CFSI handling from bytecode emission and instruction-size math, so stripping those ops happens only in AllocatedAbstractInstructionSet::remove_redundant_ops (and related stack optimizations) instead of also in to_fuel_asm and jump/offset sizing.
Globals prologue:append_globals_allocation no longer inserts CFEI when the globals section is empty, which drops the former cfei i0 ; allocate stack space for globals from script entry prologues.
Offset helpers (op_size_in_bytes, worst_case_instruction_size, instruction_size_not_far_jump) now treat CFEI/CFSI like normal 4-byte ops because zero-immediate forms should not reach those paths. E2E ASM snapshots are updated accordingly.
Reviewed by Cursor Bugbot for commit 90e73d0. Bugbot is set up for automated code reviews on this repo. Configure here.
ironcev
added
compiler
General compiler. Should eventually become more specific as the issue is triaged
compiler: codegen
Everything to do with IR->ASM, register allocation, etc.
labels
Aug 26, 2026
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
compiler: codegenEverything to do with IR->ASM, register allocation, etc.compilerGeneral compiler. Should eventually become more specific as the issue is triaged
2 participants
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.
Description
This PR:
CFEI/CFSIinstructions from theasm_langandasm_generation. That special handling was introduced in cfei: don't generate if frame size is zero #5588 as an implementation of removal ofCFEI/CFSIpairs if the allocated size was zero. Later on, Remove redundantcfe(i)/cfs(i)instructions from the allocated ASM #6627 implemented a generalCFE(I)/CFS(I)removal as a localized optimization of the allocated abstract instruction set, but it did not removed the special handling introduced by cfei: don't generate if frame size is zero #5588.CFEIfor allocating globals, if the ASM does not have any globals.Checklist
Breaking*orNew Featurelabels where relevant.