JIT: use funclet iterator in genCodeForBBlist#126588
JIT: use funclet iterator in genCodeForBBlist#126588AndyAyersMS wants to merge 2 commits intodotnet:mainfrom
Conversation
Also remove the special case 'next block' handling for callfinallyret.
|
@dotnet/jit-contrib PTAL This should make it a little easier to handle some funclet codegen issues in Wasm. |
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
There was a problem hiding this comment.
Pull request overview
This PR refactors CoreCLR JIT linear codegen to iterate over funclets using the existing Compiler::Funcs() / FuncInfoDsc::Blocks() ranges, and simplifies BBJ_CALLFINALLY handling by removing “skip-next-block” return mechanics (and instead skipping BBJ_CALLFINALLYRET blocks in block codegen).
Changes:
- Switch
genCodeForBBlistfrom a single basic-block walk to per-funclet iteration (genCodeForFunclet+genCodeForBlock). - Change
genCallFinallyandgenEmitEndBlockfrom returningBasicBlock*tovoid, removing special “next block” handling forBBJ_CALLFINALLY. - Skip
BBJ_CALLFINALLYRETblocks ingenCodeForBlocksince they contain no code.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/coreclr/jit/codegenlinear.cpp | Refactors the main block iteration into funclet/block helpers; removes “skip-ahead” return flow. |
| src/coreclr/jit/codegen.h | Updates declarations for new helpers and changes return types of genEmitEndBlock/genCallFinally. |
| src/coreclr/jit/codegenxarch.cpp | Updates genCallFinally to void and removes skip-return logic. |
| src/coreclr/jit/codegenarm.cpp | Updates genCallFinally signature/returns to match new void contract. |
| src/coreclr/jit/codegenarm64.cpp | Updates genCallFinally signature/returns to match new void contract. |
| src/coreclr/jit/codegenloongarch64.cpp | Updates genCallFinally signature/returns to match new void contract. |
| src/coreclr/jit/codegenriscv64.cpp | Updates genCallFinally signature/returns to match new void contract. |
| src/coreclr/jit/codegenwasm.cpp | Updates genCallFinally signature to void (still NYI). |
EgorBo
left a comment
There was a problem hiding this comment.
LGTM if CI/diffs are happy (needs a rerun)
|
Should be no diff. |
Also remove the special case 'next block' handling for callfinallyret.