Skip to content

JIT: Allow forward substituting small-typed nodes - #83969

Merged
jakobbotsch merged 1 commit into
dotnet:mainfrom
jakobbotsch:forward-sub-small-trees
Mar 28, 2023
Merged

JIT: Allow forward substituting small-typed nodes#83969
jakobbotsch merged 1 commit into
dotnet:mainfrom
jakobbotsch:forward-sub-small-trees

Conversation

@jakobbotsch

@jakobbotsch jakobbotsch commented Mar 27, 2023

Copy link
Copy Markdown
Member
@jakobbotsch
jakobbotsch marked this pull request as draft March 27, 2023 11:06
@ghost ghost added the area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI label Mar 27, 2023
@ghost ghost assigned jakobbotsch Mar 27, 2023
@ghost

ghost commented Mar 27, 2023

Copy link
Copy Markdown

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch, @kunalspathak
See info in area-owners.md if you want to be subscribed.

Issue Details

null

Author: jakobbotsch
Assignees: jakobbotsch
Labels:

area-CodeGen-coreclr

Milestone: -
@jakobbotsch

Copy link
Copy Markdown
Member Author

/azp run Fuzzlyn

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 1 pipeline(s).
@jakobbotsch

Copy link
Copy Markdown
Member Author

Fuzzlyn failure looks unrelated, will open a separate issue for that.

Going to bounce this... looks like it got caught up in the GitHub outage, the CI runs are actually finished but the check statuses haven't updated.

@jakobbotsch

Copy link
Copy Markdown
Member Author

/azp run runtime-coreclr jitstress, runtime-coreclr libraries-jitstress

@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines successfully started running 2 pipeline(s).
@jakobbotsch

Copy link
Copy Markdown
Member Author

The failure is #80857.

Diffs. Some of the regressions are due to some casts we no longer omit without local copy prop, before:

fgMorphTree BB01, STMT00004 (before)
               [000016] -A---------                           ASG       bool  
               [000015] D------N---                         ├──▌  LCL_VAR   bool   V04 tmp2         
               [000014] -----------                         └──▌  LCL_VAR   int    V03 tmp1          (last use)
GenTreeNode creates assertion:
               [000016] -A---+-----                           ASG       bool  
In BB01 New Local Copy     Assertion: V04 == V03, index = #03

fgMorphTree BB01, STMT00003 (before)
               [000010] -----------                           RETURN    struct
               [000009] -----------                         └──▌  LCL_VAR   struct<System.Text.Json.Nodes.JsonNodeOptions, 1>(P) V01 loc0         
                                                            └──▌    bool   V01.<unknown class>:<PropertyNameCaseInsensitive>k__BackingField (offs=0x00) -> V04 tmp2          (last use)
Replacing an independently promoted local var V01 with its only field  V04 for the return [000009]

Assertion prop in BB01:
Copy     Assertion: V04 == V03, index = #03
               [000009] -----------                           LCL_VAR   bool   V03 tmp1         

fgMorphTree BB01, STMT00003 (after)
               [000010] -----+-----                           RETURN    struct
               [000009] -----+-----                         └──▌  LCL_VAR   bool   V03 tmp1         

After:

fgMorphTree BB01, STMT00004 (after)
               [000016] -A-XG+-----                           ASG       bool  
               [000015] D----+-N---                         ├──▌  LCL_VAR   bool   V04 tmp2         
               [000011] ---XG+-----                         └──▌  IND       bool  
               [000021] -----+-----                            └──▌  ADD       byref 
               [000005] -----+-----                               ├──▌  LCL_VAR   ref    V00 this          (last use)
               [000020] -----+-----                               └──▌  CNS_INT   long   134 Fseq[<unknown field>]

fgMorphTree BB01, STMT00003 (before)
               [000010] -----------                           RETURN    struct
               [000009] -----------                         └──▌  LCL_VAR   struct<System.Text.Json.Nodes.JsonNodeOptions, 1>(P) V01 loc0         
                                                            └──▌    bool   V01.<unknown class>:<PropertyNameCaseInsensitive>k__BackingField (offs=0x00) -> V04 tmp2          (last use)
Replacing an independently promoted local var V01 with its only field  V04 for the return [000009]

fgMorphTree BB01, STMT00003 (after)
               [000010] -----+-----                           RETURN    struct
               [000022] -----+-----                         └──▌  CAST      int <- bool <- int
               [000009] -----+-----                            └──▌  LCL_VAR   int    V04 tmp2          (last use)

cc @dotnet/jit-contrib PTAL @AndyAyersMS

@jakobbotsch
jakobbotsch marked this pull request as ready for review March 27, 2023 21:26
@jakobbotsch
jakobbotsch requested a review from AndyAyersMS March 27, 2023 21:26
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

2 participants