JIT: Move return merging from fgAddInternal to a late phase #107663
Labels
area-CodeGen-coreclr
CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Milestone
Currently, we perform tail merging in
fgAddInternal
phase which is performed right after inlining. There, we minimize the number of tails (BBJ_RETURN) to 4 (I guess it's driven by legacy jit32 gc encoder having a hard limit on epilogues, but we use this threshold for other targets as well). It seems that it might break some control-flow optimizations, should we move this merging to a later phase? ideally when we know exactly the cost of an epilogue.cc @AndyAyersMS @amanasifkhalid @dotnet/jit-contrib
The text was updated successfully, but these errors were encountered: