Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove obsolete DEBUG only instance variable BasicBlock::bbLoopNum #34652

Merged
merged 2 commits into from
Apr 8, 2020

Conversation

briansull
Copy link
Contributor

Contributes to #13582

Old comment at declaration in block.h

        // This is the label a loop gets as part of the second, reachability-based
        // loop discovery mechanism.  This is apparently only used for debugging.
        // We hope we'll eventually just have one loop-discovery mechanism, and this will go away.
        INDEBUG(loopNumber bbLoopNum;) // set to 'n' for a loop #n header

This was only used by some debug Dumping and some asserts that aren't necessary.
It was very confusing as we have another loop index that is important to the loop optimizer.
As it is used to index the natural loop table: optLoopTable[index]

    loopNumber bbNatLoopNum; // Index, in optLoopTable, of most-nested loop that contains this block,
                             // or else NOT_IN_LOOP if this block is not in a loop.

Comment at declaration in block.h

    // This is the label a loop gets as part of the second, reachability-based
    // loop discovery mechanism.  This is apparently only used for debugging.
    // We hope we'll eventually just have one loop-discovery mechanism, and this will go away.
    INDEBUG(loopNumber bbLoopNum;) // set to 'n' for a loop #n header
@Dotnet-GitSync-Bot Dotnet-GitSync-Bot added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Apr 7, 2020
@briansull
Copy link
Contributor Author

@dotnet/jit-contrib PTAL

Copy link
Member

@AndyAyersMS AndyAyersMS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@briansull briansull merged commit 74bf6e5 into dotnet:master Apr 8, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants