JIT: Optimize epilog generation #8883
Labels
area-CodeGen-coreclr
CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
enhancement
Product code improvement that does NOT require public API changes/additions
help wanted
[up-for-grabs] Good issue for external contributors
JitUntriaged
CLR JIT issues needing additional triage
optimization
tenet-performance
Performance related issue
Milestone
Currently, the JIT's strategy for epilog generation is to generate one epilog per
ret
in the MSIL, except that:The analysis and transformation for both cases runs early in the phase list and merges the
GT_RETURN
nodes when returns are merged.There's an opportunity here to take a more principled approach weighing the codesize reduction of merged epilogs against the dynamic path length reduction of duplicated epilogs.
One potential approach:
GT_RETURN
s separated through optimization phases to allow a chance for constant propagation and CSE to eliminate redundancies in the return expressions, and allow removing code like we have in loop cloning and loop unrolling that currently shares the burden of respecting the max epilog limit.if (...) { return false; }
).category:cq
theme:basic-cq
skill-level:expert
cost:large
The text was updated successfully, but these errors were encountered: