Uh oh!
There was an error while loading. Please reload this page.
Pass exact context to getMethodInfo - #88025
Conversation
ghost
commented
Jun 25, 2023
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsBasically, it's Andy's patch that he never landed and asked me to. Closes #88021 boolTest() => EqualityComparer<string>.Default.Equals("str", "str");New codegen: ; Method Prog:Foo():bool:thismoveax,1ret; Total bytes of code: 6
|
hez2010
commented
Jun 26, 2023
Wow I got some impressive performance improvements in my local benchmark. But there's still some weird codegen which is unnecessary. For example: boolTest()=>newFoo(1,"hello","test")==newFoo(1,"test","hello");recordstructFoo(intx,stringy,stringz);The codegen for G_M50849_IG01: ;; offset=0000H ;; size=0 bbWeight=1.00 PerfScore 0.00G_M50849_IG02: ;; offset=0000Hxoreax,eaxje SHORT G_M50849_IG04 ;; size=4 bbWeight=1.00 PerfScore 1.25G_M50849_IG03: ;; offset=0004Hxoreax,eaxjmp SHORT G_M50849_IG05 ;; size=4 bbWeight=0.50 PerfScore 1.12G_M50849_IG04: ;; offset=0008Hxoreax,eax ;; size=2 bbWeight=0.50 PerfScore 0.12G_M50849_IG05: ;; offset=000AHret ;; size=1 bbWeight=1 PerfScore 1.00which is effectively equivalent to: xoreax,eaxret |
EgorBo
commented
Jun 26, 2023
/azp run runtime-coreclr pgo |
|
Azure Pipelines successfully started running 1 pipeline(s). |
…tmethodinfo # Conflicts: # src/coreclr/inc/jiteeversionguid.h
7cf5c9e to
3192c83CompareEgorBo
commented
Jun 30, 2023
/azp run runtime-coreclr outerloop, runtime-coreclr jitstress, runtime-extra-platforms, runtime-coreclr pgostress |
|
Azure Pipelines successfully started running 4 pipeline(s). |
Uh oh!
There was an error while loading. Please reload this page.
EgorBo
commented
Jun 30, 2023
@AndyAyersMS@jakobbotsch PTAL JIT side - it should be ready now, CI failures are not related |
EgorBo
commented
Jul 1, 2023
/azp run runtime-coreclr outerloop, runtime-extra-platforms |
|
Azure Pipelines successfully started running 2 pipeline(s). |
Uh oh!
There was an error while loading. Please reload this page.
| } | ||
| else if (ctx is InstantiatedType instantiatedCtxType) | ||
| { | ||
| method = _compilation.TypeSystemContext.GetMethodForInstantiatedType( |
There was a problem hiding this comment.
This won't work correctly for non-shared generic methods on shared generic types.
For example, G<string>.M<int>. GetTypicalMethodDefinition will drop the method instantiation, so we will end up with G<string>.M<T>. I am not sure whether this problem is reachable in practice currently.
There was a problem hiding this comment.
I've just pushed a change:
MethodDescmethodTypicalDef=method.GetTypicalMethodDefinition();if(methodTypicalDef.RequiresInstMethodDescArg()){// Presumably, a rare case: we had MyClass<T1>.Foo<int>() method and// GetTypicalMethodDefinition() converted it to MyClass<T1>.Foo<T2>}else{method=_compilation.TypeSystemContext.GetMethodForInstantiatedType(methodTypicalDef,instantiatedCtxType);}is it enough?
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
…e-1 into pass-context-getmethodinfo
72b2ec5 to
08ac385CompareEgorBo
commented
Jul 3, 2023
/azp run runtime-coreclr outerloop, runtime-extra-platforms |
|
Azure Pipelines successfully started running 2 pipeline(s). |
jkotas
commented
Jul 3, 2023
This crash looks related to the change: https://helix.dot.net/api/2019-06-17/jobs/47d2c98f-aa2e-4f5c-a38b-b6fc165d4b0b/workitems/System.Runtime.CompilerServices.Unsafe.Tests/console |
Uh oh!
There was an error while loading. Please reload this page.
Looks like it is not since it can be found in other runs e.g. https://dev.azure.com/dnceng-public/public/_build/results?buildId=327970&view=ms.vss-test-web.build-test-results-tab&runId=6761902&resultId=150352&paneView=dotnet-dnceng.dnceng-build-release-tasks.helix-test-information-tab - I'll file an issue (#88339) (PS: would love NativeAOT Libraries tests to have its own pipeline to avoid running Mono workloads) |
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
EgorBo
commented
Jul 3, 2023
@jkotas anything else to be done here? |
@EgorBo's dotnet#88025 made it possible to undo conservative scanning logic added in dotnet/corert#7618. Saves 0.4% in size for Stage1 and Stage2 apps.
@EgorBo's #88025 made it possible to undo conservative scanning logic added in dotnet/corert#7618. Saves 0.4% in size for Stage1 and Stage2 apps.
Basically, it's Andy's patch that he never landed and asked me to (with some modifications).
Closes#88021
New codegen:
It is also needed for #87847