diff options
author | Fadi Hanna <fadim@microsoft.com> | 2019-04-01 12:07:47 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-01 12:07:47 -0700 |
commit | bc9248cad132fa01dd2b641b6b22849bc7a05457 (patch) | |
tree | 5d1ee71059353a66004fc7a4d2501a7452db849f /src/vm/dllimport.cpp | |
parent | ff43a803a814eaaa5eba02cafa4a91def3e4c7be (diff) | |
download | coreclr-bc9248cad132fa01dd2b641b6b22849bc7a05457.tar.gz coreclr-bc9248cad132fa01dd2b641b6b22849bc7a05457.tar.bz2 coreclr-bc9248cad132fa01dd2b641b6b22849bc7a05457.zip |
Enable R2R compilation/inlining of PInvoke stubs where no marshalling is required (#22560)
* These changes enable the inlining of some PInvokes that do not require any marshalling. With inlined pinvokes, R2R performance should become slightly better, since we'll avoid jitting some of the pinvoke IL stubs that we jit today for S.P.CoreLib. Performance gains not yet measured.
* Added JIT_PInvokeBegin/End helpers for all architectures. Linux stubs not yet implemented
* Add INLINE_GETTHREAD for arm/arm64
* Set CORJIT_FLAG_USE_PINVOKE_HELPERS jit flag for ReadyToRun compilations
* Updating R2RDump tool to handle pinvokes
Diffstat (limited to 'src/vm/dllimport.cpp')
-rw-r--r-- | src/vm/dllimport.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/vm/dllimport.cpp b/src/vm/dllimport.cpp index c83f05ce05..5fa9ac4b85 100644 --- a/src/vm/dllimport.cpp +++ b/src/vm/dllimport.cpp @@ -3472,6 +3472,14 @@ BOOL NDirect::MarshalingRequired(MethodDesc *pMD, PCCOR_SIGNATURE pSig /*= NULL* return TRUE; } +#ifdef FEATURE_READYTORUN_COMPILER + if (IsReadyToRunCompilation()) + { + if (!hndArgType.AsMethodTable()->IsLayoutInCurrentVersionBubble()) + return TRUE; + } +#endif + // return value is fine as long as it can be normalized to an integer if (i == 0) { |