Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Preserve value numbers in gtSetEvalOrder #11207

Merged
merged 1 commit into from
May 19, 2017

Conversation

JosephTremoulet
Copy link

There was already code to preserve the value number during global CSE, but
value numbers remain relevant through assertion prop, so this changes the
code to simply always pass the PRESERVE_VN flag.

@JosephTremoulet
Copy link
Author

This resolves a side issue getting in the way of #10050.

Jit-diff reports:

Summary:
(Note: Lower is better)
Total bytes of diff: -3039 (0.00 % of base)
    diff is an improvement.
Total byte diff includes 0 bytes from reconciling methods
        Base had    0 unique methods,        0 unique bytes
        Diff had    0 unique methods,        0 unique bytes
Top file regressions by size (bytes):
           9 : JIT\Directed\Arrays\Complex1\Complex1.dasm (0.46 % of base)
           8 : JIT\Directed\Arrays\Simple1\Simple1.dasm (0.42 % of base)
Top file improvements by size (bytes):
        -522 : Microsoft.CodeAnalysis.CSharp.dasm (-0.02 % of base)
        -259 : System.Private.CoreLib.dasm (-0.01 % of base)
        -152 : Microsoft.CodeAnalysis.dasm (-0.02 % of base)
        -130 : JIT\Performance\CodeQuality\SciMark\SciMark\SciMark.dasm (-0.80 % of base)
        -114 : System.Linq.Expressions.dasm (-0.02 % of base)
75 total files with size differences (73 improved, 2 regressed).
Top method regessions by size (bytes):
           9 : JIT\Directed\Arrays\Complex1\Complex1.dasm - Complex_Array_Test:Main(ref):int
           8 : System.Private.CoreLib.dasm - RuntimeType:InvokeMember(ref,int,ref,ref,ref,ref,ref,ref):ref:this
           8 : JIT\Directed\Arrays\Simple1\Simple1.dasm - Simple_Array_Test:Main(ref):int
Top method improvements by size (bytes):
         -76 : Microsoft.CodeAnalysis.dasm - CommonReferenceManager`2:ReuseAssemblySymbolsWithNoPiaLocalTypes(ref,ref,struct,int):bool:this
         -74 : Microsoft.CodeAnalysis.CSharp.dasm - ReferenceManager:SetupReferencesForFileAssembly(ref,ref,int,byref,ref)
         -42 : Microsoft.CodeAnalysis.CSharp.dasm - NamedTypeSymbol:EqualsComplicatedCases(ref,bool,bool):bool:this
         -42 : System.Private.Uri.dasm - UriHelper:MatchUTF8Sequence(long,ref,byref,ref,int,ref,int,bool,bool)
         -40 : System.Linq.Expressions.dasm - Expression:ValidateLambdaArgs(ref,byref,ref,ref)
135 total methods with size differences (132 improved, 3 regressed).

I looked at the regressions; they are cases where the additional assertion's we're now tracking make us bump up against our assertion index limit. The improvements are cases of redundant code being removed by assertion prop, as you'd expect.

I'm not planning to merge this until after the 2.0 stabilization.

/cc @dotnet/jit-contrib

@erozenfeld
Copy link
Member

LGTM

Copy link

@pgavlin pgavlin 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
Copy link

LGTM

There was already code to preserve the value number during global CSE, but
value numbers remain relevant through assertion prop, so this changes the
code to simply always pass the PRESERVE_VN flag.
@JosephTremoulet JosephTremoulet merged commit d1c8164 into dotnet:master May 19, 2017
@JosephTremoulet JosephTremoulet deleted the PreserveVN branch May 19, 2017 14:01
@karelz karelz modified the milestone: 2.0.0 Aug 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants