Skip to content

Revisit lclVar ref count updates when remorphing. #7047

Closed

Description

@pgavlin

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

Activity

  1. briansull commented on Nov 23, 2016

    @briansull
    Contributor

    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?

  2. russellhadley commented on Apr 18, 2017

    @russellhadley
    Contributor

    @erozenfeld for context.

  3. AndyAyersMS commented on May 8, 2018

    @AndyAyersMS
    Member

    Some of the consequences of this show up in dotnet/coreclr#9068 / dotnet/coreclr#15491 -- overly large or entirely unnecessary stack frames.

  4. AndyAyersMS commented on Aug 2, 2018

    @AndyAyersMS
    Member

    Hope to address this with the work outlined in dotnet/coreclr#18969.

  5. transferred this issue fromdotnet/coreclron Jan 31, 2020
  6. added this to the Future milestone on Jan 31, 2020
  7. erozenfeld commented on Jun 17, 2020

    @erozenfeld
    Contributor

    @AndyAyersMS Can this be closed now that #10702 is done?

  8. AndyAyersMS commented on Jun 17, 2020

    @AndyAyersMS
    Member

    Yes.

  9. ghost locked as resolved and limited conversation to collaborators on Dec 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

area-CodeGen-coreclrenhancement

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions