Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/design/coreclr/botr/readytorun-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -872,7 +872,7 @@ enum ReadyToRunHelper
READYTORUN_HELPER_MemCpy = 0x41,

// Get string handle lazily
READYTORUN_HELPER_GetString = 0x50,
READYTORUN_HELPER_GetString = 0x50, // Unused since READYTORUN_MAJOR_VERSION 17.0

// Used by /Tuning for Profile optimizations
READYTORUN_HELPER_LogMethodEnter = 0x51, // Unused since READYTORUN_MAJOR_VERSION 10.0
Expand Down
14 changes: 0 additions & 14 deletions src/coreclr/System.Private.CoreLib/src/System/String.CoreCLR.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,6 @@ namespace System
{
public partial class String
{
[LibraryImport(RuntimeHelpers.QCall, EntryPoint = "String_StrCns")]
private static unsafe partial string* StrCnsInternal(uint rid, IntPtr scopeHandle);

// implementation of CORINFO_HELP_STRCNS
[StackTraceHidden]
[DebuggerStepThrough]
[DebuggerHidden]
internal static unsafe string StrCns(uint rid, IntPtr scopeHandle)
{
string* ptr = StrCnsInternal(rid, scopeHandle);
Debug.Assert(ptr != null);
return *ptr;
}

[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern unsafe string FastAllocateString(MethodTable *pMT, nint length);

Expand Down
8 changes: 0 additions & 8 deletions src/coreclr/inc/corinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,6 @@ enum CorInfoHelpFunc
CORINFO_HELP_NEWARR_1_VC, // optimized 1-D value class arrays
CORINFO_HELP_NEWARR_1_ALIGN8, // like VC, but aligns the array start

CORINFO_HELP_STRCNS, // create a new string literal

/* Object model */

CORINFO_HELP_INITCLASS, // Initialize class if not already initialized
Expand Down Expand Up @@ -3223,12 +3221,6 @@ class ICorDynamicInfo : public ICorStaticInfo
CORINFO_CONST_LOOKUP * pResult
) = 0;

// get slow lazy string literal helper to use (CORINFO_HELP_STRCNS*).
// Returns CORINFO_HELP_UNDEF if lazy string literal helper cannot be used.
virtual CorInfoHelpFunc getLazyStringLiteralHelper(
CORINFO_MODULE_HANDLE handle
) = 0;

virtual CORINFO_MODULE_HANDLE embedModuleHandle(
CORINFO_MODULE_HANDLE handle,
void **ppIndirection = NULL
Expand Down
3 changes: 0 additions & 3 deletions src/coreclr/inc/icorjitinfoimpl_generated.h
Original file line number Diff line number Diff line change
Expand Up @@ -556,9 +556,6 @@ void getFunctionFixedEntryPoint(
bool isUnsafeFunctionPointer,
CORINFO_CONST_LOOKUP* pResult) override;

CorInfoHelpFunc getLazyStringLiteralHelper(
CORINFO_MODULE_HANDLE handle) override;

CORINFO_MODULE_HANDLE embedModuleHandle(
CORINFO_MODULE_HANDLE handle,
void** ppIndirection) override;
Expand Down
10 changes: 5 additions & 5 deletions src/coreclr/inc/jiteeversionguid.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@

#include <minipal/guid.h>

constexpr GUID JITEEVersionIdentifier = { /* 567f89f4-2ddb-4d80-9107-0ce8c30a18ff */
0x567f89f4,
0x2ddb,
0x4d80,
{0x91, 0x07, 0x0c, 0xe8, 0xc3, 0x0a, 0x18, 0xff}
constexpr GUID JITEEVersionIdentifier = { /* 4a42a64a-d034-44d4-8f0d-b7f67b3ea4dc */
0x4a42a64a,
0xd034,
0x44d4,
{0x8f, 0x0d, 0xb7, 0xf6, 0x7b, 0x3e, 0xa4, 0xdc}
};

#endif // JIT_EE_VERSIONING_GUID_H
2 changes: 0 additions & 2 deletions src/coreclr/inc/jithelpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,6 @@
DYNAMICJITHELPER(CORINFO_HELP_NEWARR_1_VC, RhpNewVariableSizeObject, METHOD__NIL)
DYNAMICJITHELPER(CORINFO_HELP_NEWARR_1_ALIGN8, RhpNewVariableSizeObject, METHOD__NIL)

DYNAMICJITHELPER(CORINFO_HELP_STRCNS, NULL, METHOD__STRING__STRCNS)

// Object model
DYNAMICJITHELPER(CORINFO_HELP_INITCLASS, NULL, METHOD__INITHELPERS__INITCLASS)
DYNAMICJITHELPER(CORINFO_HELP_INITINSTCLASS, NULL, METHOD__INITHELPERS__INITINSTANTIATEDCLASS)
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/inc/readytorun.h
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ enum ReadyToRunHelper
READYTORUN_HELPER_ReversePInvokeExit = 0x46,

// Get string handle lazily
READYTORUN_HELPER_GetString = 0x50,
READYTORUN_HELPER_GetString = 0x50, // No longer supported as of READYTORUN_MAJOR_VERSION 17.0

// Used by /Tuning for Profile optimizations
READYTORUN_HELPER_LogMethodEnter = 0x51, // No longer supported as of READYTORUN_MAJOR_VERSION 10.0
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/jit/ICorJitInfo_names_generated.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,6 @@ DEF_CLR_API(getAddrOfCaptureThreadGlobal)
DEF_CLR_API(getHelperFtn)
DEF_CLR_API(getFunctionEntryPoint)
DEF_CLR_API(getFunctionFixedEntryPoint)
DEF_CLR_API(getLazyStringLiteralHelper)
DEF_CLR_API(embedModuleHandle)
DEF_CLR_API(embedClassHandle)
DEF_CLR_API(embedMethodHandle)
Expand Down
9 changes: 0 additions & 9 deletions src/coreclr/jit/ICorJitInfo_wrapper_generated.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1310,15 +1310,6 @@ void WrapICorJitInfo::getFunctionFixedEntryPoint(
API_LEAVE(getFunctionFixedEntryPoint);
}

CorInfoHelpFunc WrapICorJitInfo::getLazyStringLiteralHelper(
CORINFO_MODULE_HANDLE handle)
{
API_ENTER(getLazyStringLiteralHelper);
CorInfoHelpFunc temp = wrapHnd->getLazyStringLiteralHelper(handle);
API_LEAVE(getLazyStringLiteralHelper);
return temp;
}

CORINFO_MODULE_HANDLE WrapICorJitInfo::embedModuleHandle(
CORINFO_MODULE_HANDLE handle,
void** ppIndirection)
Expand Down
2 changes: 1 addition & 1 deletion src/coreclr/jit/compiler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4057,7 +4057,7 @@ inline bool Compiler::IsSharedStaticHelper(GenTree* tree)
bool result1 =
// More helpers being added to IsSharedStaticHelper (that have similar behaviors but are not true
// ShareStaticHelpers)
helper == CORINFO_HELP_STRCNS || helper == CORINFO_HELP_BOX ||
helper == CORINFO_HELP_BOX ||

// helpers being added to IsSharedStaticHelper
helper == CORINFO_HELP_GETSTATICFIELDADDR_TLS ||
Expand Down
30 changes: 0 additions & 30 deletions src/coreclr/jit/morph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6714,36 +6714,6 @@ GenTree* Compiler::fgMorphConst(GenTree* tree)
return fgMorphTree(gtNewStringLiteralNode(iat, pValue));
}

// TODO-CQ: Do this for compCurBB->isRunRarely(). Doing that currently will
// guarantee slow performance for that block. Instead cache the return value
// of CORINFO_HELP_STRCNS and go to cache first giving reasonable perf.

bool useLazyStrCns = false;
if (compCurBB->KindIs(BBJ_THROW))
{
useLazyStrCns = true;
}
else if (fgGlobalMorph && compCurStmt->GetRootNode()->IsCall())
{
// Quick check: if the root node of the current statement happens to be a noreturn call.
GenTreeCall* call = compCurStmt->GetRootNode()->AsCall();
useLazyStrCns = call->IsNoReturn() || fgIsThrow(call);
}

if (useLazyStrCns)
{
CorInfoHelpFunc helper = info.compCompHnd->getLazyStringLiteralHelper(tree->AsStrCon()->gtScpHnd);
if (helper != CORINFO_HELP_UNDEF)
{
// For un-important blocks, we want to construct the string lazily

tree =
gtNewHelperCallNode(helper, TYP_REF, gtNewIconNode(RidFromToken(tree->AsStrCon()->gtSconCPX), TYP_INT),
gtNewIconEmbScpHndNode(tree->AsStrCon()->gtScpHnd));
return fgMorphTree(tree);
}
}

assert(tree->AsStrCon()->gtScpHnd == info.compScopeHnd || !IsUninitialized(tree->AsStrCon()->gtScpHnd));

LPVOID pValue;
Expand Down
9 changes: 0 additions & 9 deletions src/coreclr/jit/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1606,15 +1606,6 @@ void HelperCallProperties::init()
nonNullReturn = true;
break;

// Heap Allocation helpers that are also pure
case CORINFO_HELP_STRCNS:

isPure = true;
isAllocator = true;
nonNullReturn = true;
exceptions = ExceptionSetFlags::None; // only can throw OutOfMemory
break;

case CORINFO_HELP_BOX_NULLABLE:
// Box Nullable is not a 'pure' function
// It has a Byref argument that it reads the contents of.
Expand Down
4 changes: 0 additions & 4 deletions src/coreclr/jit/valuenum.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14291,10 +14291,6 @@ VNFunc Compiler::fgValueNumberJitHelperMethodVNFunc(CorInfoHelpFunc helpFunc)
vnf = VNF_RuntimeHandleClass;
break;

case CORINFO_HELP_STRCNS:
vnf = VNF_LazyStrCns;
break;

case CORINFO_HELP_CHKCASTCLASS:
case CORINFO_HELP_CHKCASTCLASS_SPECIAL:
case CORINFO_HELP_CHKCASTARRAY:
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/jit/valuenumfuncs.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ ValueNumFuncDef(JitReadyToRunNewLclArr, 3, false, true, false)
ValueNumFuncDef(Box, 3, false, true, false)
ValueNumFuncDef(BoxNullable, 3, false, false, false)

ValueNumFuncDef(LazyStrCns, 2, false, true, false) // Lazy-initialized string literal (helper)
ValueNumFuncDef(InvariantLoad, 1, false, false, false) // Args: 0: (VN of) the address.
ValueNumFuncDef(InvariantNonNullLoad, 1, false, true, false) // Args: 0: (VN of) the address.
ValueNumFuncDef(Unbox, 2, false, false, false)
Expand Down
1 change: 0 additions & 1 deletion src/coreclr/tools/Common/JitInterface/CorInfoHelpFunc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,6 @@ which is the right helper to use to allocate an object of a given type. */
CORINFO_HELP_NEWARR_1_VC, // optimized 1-D value class arrays
CORINFO_HELP_NEWARR_1_ALIGN8, // like VC, but aligns the array start

CORINFO_HELP_STRCNS, // create a new string literal
/* Object model */

CORINFO_HELP_INITCLASS, // Initialize class if not already initialized
Expand Down
8 changes: 0 additions & 8 deletions src/coreclr/tools/Common/JitInterface/CorInfoImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3655,14 +3655,6 @@ public static ReadyToRunHelperId GetReadyToRunHelperFromStaticBaseHelper(CorInfo
private void getFunctionFixedEntryPoint(CORINFO_METHOD_STRUCT_* ftn, bool isUnsafeFunctionPointer, ref CORINFO_CONST_LOOKUP pResult)
{ throw new NotImplementedException("getFunctionFixedEntryPoint"); }

#pragma warning disable CA1822 // Mark members as static
private CorInfoHelpFunc getLazyStringLiteralHelper(CORINFO_MODULE_STRUCT_* handle)
#pragma warning restore CA1822 // Mark members as static
{
// TODO: Lazy string literal helper
return CorInfoHelpFunc.CORINFO_HELP_UNDEF;
}

private CORINFO_MODULE_STRUCT_* embedModuleHandle(CORINFO_MODULE_STRUCT_* handle, ref void* ppIndirection)
{ throw new NotImplementedException("embedModuleHandle"); }

Expand Down
Loading
Loading