JIT: Use metadata names for SIMD intrinsic method recognition#76786
JIT: Use metadata names for SIMD intrinsic method recognition#76786jakobbotsch merged 8 commits intodotnet:mainfrom
Conversation
eeGetMethodName is only expected to be used for diagnostics.
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailseeGetMethodName is only expected to be used for diagnostics.
|
|
If I am reading the code correctly, we are always going to ask for |
|
If it is too complex refactoring, we should add and flip the same check in |
|
It's a good point. The refactoring does look a little complicated to do, but |
|
@jkotas I started with a larger refactoring but as you mentioned it does end up being a more major operation, so for this PR I went with your second suggestion instead. |
| if (enclosingClassName != NULL && pMT->GetClass()->IsNested()) | ||
| { | ||
| IfFailThrow(pMDImport->GetNameOfTypeDef(pMT->GetEnclosingCl(), &enclosingResult, &namespaceResult)); | ||
| IfFailThrow(pMDImport->GetNameOfTypeDef(pMT->GetEnclosingCl(), enclosingClassName, namespaceName)); |
There was a problem hiding this comment.
This logic seems a bit odd to me in terms of the namespaceResult, IIUC it will work only for one level of nesting.
There was a problem hiding this comment.
This is designed to handle just enough for the JIT to identify intrinsics. We only need one level of nesting for that.
src/coreclr/jit/importer.cpp
Outdated
| { | ||
| bIntrinsicImported = true; | ||
| goto DONE_CALL; | ||
| call = impSIMDIntrinsic(opcode, newobjThis, clsHnd, methHnd, sig, mflags, pResolvedToken->token); |
There was a problem hiding this comment.
Should this just be part of the slightly higher check that already exists?
There isn't any real reason it should be separate or not handled in impIntrinsic...
There was a problem hiding this comment.
I initially tried refactoring this and moving it in to be part of impIntrinsic, but it turned out to be a bit more work than I wanted here. Also wasn't totally sure with the alt-jit check if I could just move it under the existing if.
I am planning to do some more refactoring for this (starting with #76792) so I think I will leave the further clean up to a future PR.
|
Failure is known according to build analysis. |
eeGetMethodName is only expected to be used for diagnostics.
In practice this does not cause issues, but some odd situations could occur in the cases where
eeGetMethodNamereturns a placeholder name during SPMI replay.Also avoid unnecessary EE call in
impSIMDIntrinsicin the common case of no SIMD intrinsic.