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
{{ message }}
Repository navigation
Revisit lclVar ref count updates when remorphing. #7047
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIenhancementProduct code improvement that does NOT require public API changes/additions
Remorphing a tree can introduce or remove references to existing lclVars, but the morpher is not designed to update lclVar ref counts (as global morphing happens before lclVar refcounts have been initialized). This can cause assertions later on in the pipeline (see e.g. #7035). dotnet/coreclr#8284 contains a conservative fix for remorphing that happens via fgMorphBlockStmt, but it may be advantageous to change the design s.t. we can be more precise.
category:correctness
theme:ref-counts
skill-level:expert
cost:medium
Is the issue that in the initial global morph phase we don't want to inc/dec the counts, but in subsequent re-morph calls we do want to inc/dec the counts?
area-CodeGen-coreclrCLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMIenhancementProduct code improvement that does NOT require public API changes/additions
Activity
briansull commentedon Nov 23, 2016
Is the issue that in the initial global morph phase we don't want to inc/dec the counts, but in subsequent re-morph calls we do want to inc/dec the counts?
russellhadley commentedon Apr 18, 2017
@erozenfeld for context.
AndyAyersMS commentedon May 8, 2018
Some of the consequences of this show up in dotnet/coreclr#9068 / dotnet/coreclr#15491 -- overly large or entirely unnecessary stack frames.
AndyAyersMS commentedon Aug 2, 2018
Hope to address this with the work outlined in dotnet/coreclr#18969.
erozenfeld commentedon Jun 17, 2020
@AndyAyersMS Can this be closed now that #10702 is done?
AndyAyersMS commentedon Jun 17, 2020
Yes.