Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jtschuster committed Jun 19, 2023
2 parents 0cc937e + eb71494 commit a16a7d6
Show file tree
Hide file tree
Showing 182 changed files with 3,427 additions and 3,585 deletions.
8 changes: 7 additions & 1 deletion eng/intellisense.targets
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,18 @@
</Target>

<PropertyGroup Condition="'$(UseIntellisensePackageDocXmlFile)' == 'true'">
<NoWarn>$(NoWarn);1591</NoWarn>
<IntellisensePackageXmlRootFolder>$([MSBuild]::NormalizeDirectory('$(NuGetPackageRoot)', 'microsoft.private.intellisense', '$(MicrosoftPrivateIntellisenseVersion)', 'IntellisenseFiles'))</IntellisensePackageXmlRootFolder>
<IntellisensePackageXmlFilePathFromNetFolder>$([MSBuild]::NormalizePath('$(IntellisensePackageXmlRootFolder)', 'net', '1033', '$(AssemblyName).xml'))</IntellisensePackageXmlFilePathFromNetFolder>
<IntellisensePackageXmlFilePathFromDotNetPlatExtFolder>$([MSBuild]::NormalizePath('$(IntellisensePackageXmlRootFolder)', 'dotnet-plat-ext', '1033', '$(AssemblyName).xml'))</IntellisensePackageXmlFilePathFromDotNetPlatExtFolder>
<IntellisensePackageXmlFilePath Condition="'$(IntellisensePackageXmlFilePath)' == '' and Exists($(IntellisensePackageXmlFilePathFromNetFolder))">$(IntellisensePackageXmlFilePathFromNetFolder)</IntellisensePackageXmlFilePath>
<IntellisensePackageXmlFilePath Condition="'$(IntellisensePackageXmlFilePath)' == '' and Exists($(IntellisensePackageXmlFilePathFromDotNetPlatExtFolder))">$(IntellisensePackageXmlFilePathFromDotNetPlatExtFolder)</IntellisensePackageXmlFilePath>
<!-- Suppress "CS1591 - Missing XML comment for publicly visible type or member" compiler errors if
- the intellisense package xml file is used or
- the assembly is private (i.e. System.Private.Uri) or
- the assembly is a PNSE assembly. -->
<NoWarn Condition="'$(IntellisensePackageXmlFilePath)' != '' or
'$(IsPrivateAssembly)' == 'true' or
'$(GeneratePlatformNotSupportedAssemblyMessage)' != ''">$(NoWarn);1591</NoWarn>
</PropertyGroup>

<ItemGroup>
Expand Down
485 changes: 214 additions & 271 deletions src/coreclr/inc/corinfo.h

Large diffs are not rendered by default.

60 changes: 29 additions & 31 deletions src/coreclr/inc/corjit.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,11 +191,11 @@ class ICorJitCompiler
// * For the 64 bit jit this is implemented by code:PreJit.compileMethod
// Note: setTargetOS must be called before this api is used.
virtual CorJitResult compileMethod (
ICorJitInfo *comp, /* IN */
struct CORINFO_METHOD_INFO *info, /* IN */
unsigned /* code:CorJitFlag */ flags, /* IN */
uint8_t **nativeEntry, /* OUT */
uint32_t *nativeSizeOfCode /* OUT */
ICorJitInfo* comp, /* IN */
struct CORINFO_METHOD_INFO* info, /* IN */
unsigned /* code:CorJitFlag */ flags, /* IN */
uint8_t** nativeEntry, /* OUT */
uint32_t* nativeSizeOfCode /* OUT */
) = 0;

// Do any appropriate work at process shutdown. Default impl is to do nothing.
Expand Down Expand Up @@ -251,7 +251,7 @@ class ICorJitInfo : public ICorDynamicInfo
virtual void reserveUnwindInfo (
bool isFunclet, /* IN */
bool isColdCode, /* IN */
uint32_t unwindSize /* IN */
uint32_t unwindSize /* IN */
) = 0;

// Allocate and initialize the .rdata and .pdata for this method or
Expand All @@ -272,19 +272,18 @@ class ICorJitInfo : public ICorDynamicInfo
// funcKind type of funclet (main method code, handler, filter)
//
virtual void allocUnwindInfo (
uint8_t * pHotCode, /* IN */
uint8_t * pColdCode, /* IN */
uint32_t startOffset, /* IN */
uint32_t endOffset, /* IN */
uint32_t unwindSize, /* IN */
uint8_t * pUnwindBlock, /* IN */
CorJitFuncKind funcKind /* IN */
uint8_t * pHotCode, /* IN */
uint8_t * pColdCode, /* IN */
uint32_t startOffset, /* IN */
uint32_t endOffset, /* IN */
uint32_t unwindSize, /* IN */
uint8_t * pUnwindBlock, /* IN */
CorJitFuncKind funcKind /* IN */
) = 0;

// Get a block of memory needed for the code manager information,
// (the info for enumerating the GC pointers while crawling the
// stack frame).
// Note that allocMem must be called first
// Get a block of memory needed for the code manager information,
// (the info for enumerating the GC pointers while crawling the
// stack frame). Note that allocMem must be called first.
virtual void * allocGCInfo (
size_t size /* IN */
) = 0;
Expand All @@ -293,7 +292,7 @@ class ICorJitInfo : public ICorDynamicInfo
// This is guaranteed to be called before any 'setEHinfo' call.
// Note that allocMem must be called before this method can be called.
virtual void setEHcount (
unsigned cEH /* IN */
unsigned cEH /* IN */
) = 0;

// Set the values for one particular exception handler block.
Expand All @@ -303,7 +302,7 @@ class ICorJitInfo : public ICorDynamicInfo
// determine if a "finally" clause is executing.
virtual void setEHinfo (
unsigned EHnumber, /* IN */
const CORINFO_EH_CLAUSE *clause /* IN */
const CORINFO_EH_CLAUSE* clause /* IN */
) = 0;

// Level -> fatalError, Level 2 -> Error, Level 3 -> Warning
Expand Down Expand Up @@ -463,20 +462,19 @@ class ICorJitInfo : public ICorDynamicInfo
// the call site has no signature information (e.g. a helper call) or has no method handle
// (e.g. a CALLI P/Invoke), then null should be passed instead.
virtual void recordCallSite(
uint32_t instrOffset, /* IN */
CORINFO_SIG_INFO * callSig, /* IN */
CORINFO_METHOD_HANDLE methodHandle /* IN */
uint32_t instrOffset, /* IN */
CORINFO_SIG_INFO * callSig, /* IN */
CORINFO_METHOD_HANDLE methodHandle /* IN */
) = 0;

// A relocation is recorded if we are pre-jitting.
// A jump thunk may be inserted if we are jitting
virtual void recordRelocation(
void * location, /* IN */
void * locationRW, /* IN */
void * target, /* IN */
uint16_t fRelocType, /* IN */
uint16_t slotNum = 0, /* IN */
int32_t addlDelta = 0 /* IN */
void * location, /* IN */
void * locationRW, /* IN */
void * target, /* IN */
uint16_t fRelocType, /* IN */
int32_t addlDelta = 0 /* IN */
) = 0;

virtual uint16_t getRelocTypeHint(void * target) = 0;
Expand All @@ -491,9 +489,9 @@ class ICorJitInfo : public ICorDynamicInfo
// Fetches extended flags for a particular compilation instance. Returns
// the number of bytes written to the provided buffer.
virtual uint32_t getJitFlags(
CORJIT_FLAGS* flags, /* IN: Points to a buffer that will hold the extended flags. */
uint32_t sizeInBytes /* IN: The size of the buffer. Note that this is effectively a
version number for the CORJIT_FLAGS value. */
CORJIT_FLAGS* flags, /* IN: Points to a buffer that will hold the extended flags. */
uint32_t sizeInBytes /* IN: The size of the buffer. Note that this is effectively a
version number for the CORJIT_FLAGS value. */
) = 0;
};

Expand Down
113 changes: 34 additions & 79 deletions src/coreclr/inc/corjitflags.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,97 +22,52 @@ class CORJIT_FLAGS
{
public:

// Note: these flags can be #ifdef'ed, but no number should be re-used between different #ifdef conditions,
// so platform-independent code can know uniquely which number corresponds to which flag.
enum CorJitFlag
{
CORJIT_FLAG_CALL_GETJITFLAGS = 0xffffffff, // Indicates that the JIT should retrieve flags in the form of a
// pointer to a CORJIT_FLAGS value via ICorJitInfo::getJitFlags().
CORJIT_FLAG_SPEED_OPT = 0,
CORJIT_FLAG_SIZE_OPT = 1,

CORJIT_FLAG_SPEED_OPT = 0, // optimize for speed
CORJIT_FLAG_SIZE_OPT = 1, // optimize for code size
CORJIT_FLAG_DEBUG_CODE = 2, // generate "debuggable" code (no code-mangling optimizations)
CORJIT_FLAG_DEBUG_EnC = 3, // We are in Edit-n-Continue mode
CORJIT_FLAG_DEBUG_INFO = 4, // generate line and local-var info
CORJIT_FLAG_MIN_OPT = 5, // disable all jit optimizations (not necessarily debuggable code)
CORJIT_FLAG_ENABLE_CFG = 6, // generate control-flow guard checks
CORJIT_FLAG_MCJIT_BACKGROUND = 7, // Calling from multicore JIT background thread, do not call JitComplete

#if defined(TARGET_X86)
CORJIT_FLAG_PINVOKE_RESTORE_ESP = 8, // Restore ESP after returning from inlined PInvoke
#else // !defined(TARGET_X86)
CORJIT_FLAG_UNUSED2 = 8,
#endif // !defined(TARGET_X86)

CORJIT_FLAG_UNUSED3 = 9,
CORJIT_FLAG_UNUSED4 = 10,
CORJIT_FLAG_UNUSED5 = 11,
CORJIT_FLAG_UNUSED6 = 12,

CORJIT_FLAG_OSR = 13, // Generate alternate method for On Stack Replacement

CORJIT_FLAG_ALT_JIT = 14, // JIT should consider itself an ALT_JIT
CORJIT_FLAG_FROZEN_ALLOC_ALLOWED = 15, // JIT is allowed to use *_MAYBEFROZEN allocators
CORJIT_FLAG_UNUSED9 = 16,
CORJIT_FLAG_UNUSED10 = 17,

CORJIT_FLAG_MAKEFINALCODE = 18, // Use the final code generator, i.e., not the interpreter.
CORJIT_FLAG_READYTORUN = 19, // Use version-resilient code generation
CORJIT_FLAG_PROF_ENTERLEAVE = 20, // Instrument prologues/epilogues
CORJIT_FLAG_UNUSED11 = 21,
CORJIT_FLAG_PROF_NO_PINVOKE_INLINE = 22, // Disables PInvoke inlining
CORJIT_FLAG_UNUSED12 = 23,
CORJIT_FLAG_PREJIT = 24, // jit or prejit is the execution engine.
CORJIT_FLAG_RELOC = 25, // Generate relocatable code
CORJIT_FLAG_UNUSED13 = 26,
CORJIT_FLAG_IL_STUB = 27, // method is an IL stub
CORJIT_FLAG_PROCSPLIT = 28, // JIT should separate code into hot and cold sections
CORJIT_FLAG_BBINSTR = 29, // Collect basic block profile information
CORJIT_FLAG_BBOPT = 30, // Optimize method based on profile information
CORJIT_FLAG_FRAMED = 31, // All methods have an EBP frame
CORJIT_FLAG_BBINSTR_IF_LOOPS = 32, // JIT must instrument current method if it has loops
CORJIT_FLAG_PUBLISH_SECRET_PARAM = 33, // JIT must place stub secret param into local 0. (used by IL stubs)
CORJIT_FLAG_UNUSED14 = 34,
CORJIT_FLAG_UNUSED37 = 35,
CORJIT_FLAG_USE_PINVOKE_HELPERS = 36, // The JIT should use the PINVOKE_{BEGIN,END} helpers instead of emitting inline transitions
CORJIT_FLAG_REVERSE_PINVOKE = 37, // The JIT should insert REVERSE_PINVOKE_{ENTER,EXIT} helpers into method prolog/epilog
CORJIT_FLAG_TRACK_TRANSITIONS = 38, // The JIT should insert the REVERSE_PINVOKE helper variants that track transitions.
CORJIT_FLAG_TIER0 = 39, // This is the initial tier for tiered compilation which should generate code as quickly as possible
CORJIT_FLAG_TIER1 = 40, // This is the final tier (for now) for tiered compilation which should generate high quality code
CORJIT_FLAG_ENABLE_CFG = 6, // generate CFG enabled code
CORJIT_FLAG_OSR = 7, // Generate alternate version for On Stack Replacement
CORJIT_FLAG_ALT_JIT = 8, // JIT should consider itself an ALT_JIT
CORJIT_FLAG_FROZEN_ALLOC_ALLOWED = 9, // JIT is allowed to use *_MAYBEFROZEN allocators
CORJIT_FLAG_MAKEFINALCODE = 10, // Use the final code generator, i.e., not the interpreter.
CORJIT_FLAG_READYTORUN = 11, // Use version-resilient code generation
CORJIT_FLAG_PROF_ENTERLEAVE = 12, // Instrument prologues/epilogues
CORJIT_FLAG_PROF_NO_PINVOKE_INLINE = 13, // Disables PInvoke inlining
CORJIT_FLAG_PREJIT = 14, // prejit is the execution engine.
CORJIT_FLAG_RELOC = 15, // Generate relocatable code
CORJIT_FLAG_IL_STUB = 16, // method is an IL stub
CORJIT_FLAG_PROCSPLIT = 17, // JIT should separate code into hot and cold sections
CORJIT_FLAG_BBINSTR = 18, // Collect basic block profile information
CORJIT_FLAG_BBINSTR_IF_LOOPS = 19, // JIT must instrument current method if it has loops
CORJIT_FLAG_BBOPT = 20, // Optimize method based on profile information
CORJIT_FLAG_FRAMED = 21, // All methods have an EBP frame
CORJIT_FLAG_PUBLISH_SECRET_PARAM = 22, // JIT must place stub secret param into local 0. (used by IL stubs)
CORJIT_FLAG_USE_PINVOKE_HELPERS = 23, // The JIT should use the PINVOKE_{BEGIN,END} helpers instead of emitting inline transitions
CORJIT_FLAG_REVERSE_PINVOKE = 24, // The JIT should insert REVERSE_PINVOKE_{ENTER,EXIT} helpers into method prolog/epilog
CORJIT_FLAG_TRACK_TRANSITIONS = 25, // The JIT should insert the helper variants that track transitions.
CORJIT_FLAG_TIER0 = 26, // This is the initial tier for tiered compilation which should generate code as quickly as possible
CORJIT_FLAG_TIER1 = 27, // This is the final tier (for now) for tiered compilation which should generate high quality code
CORJIT_FLAG_NO_INLINING = 28, // JIT should not inline any called method into this method

#if defined(TARGET_ARM)
CORJIT_FLAG_RELATIVE_CODE_RELOCS = 41, // JIT should generate PC-relative address computations instead of EE relocation records
#else // !defined(TARGET_ARM)
CORJIT_FLAG_UNUSED15 = 41,
#endif // !defined(TARGET_ARM)
CORJIT_FLAG_RELATIVE_CODE_RELOCS = 29, // JIT should generate PC-relative address computations instead of EE relocation records
CORJIT_FLAG_SOFTFP_ABI = 30, // Enable armel calling convention
#endif

CORJIT_FLAG_NO_INLINING = 42, // JIT should not inline any called method into this method
#if defined(TARGET_X86) || defined(TARGET_AMD64)
CORJIT_FLAG_VECTOR512_THROTTLING = 31, // On x86/x64, 512-bit vector usage may incur CPU frequency throttling
#endif

#if defined(TARGET_ARM)
CORJIT_FLAG_SOFTFP_ABI = 43, // On ARM should enable armel calling convention
#elif defined(TARGET_X86) || defined(TARGET_AMD64)
CORJIT_FLAG_VECTOR512_THROTTLING = 43, // On Xarch, 512-bit vector usage may incur CPU frequency throttling
#else
CORJIT_FLAG_UNUSED16 = 43,
#endif // !defined(TARGET_ARM)

CORJIT_FLAG_UNUSED17 = 44,
CORJIT_FLAG_UNUSED18 = 45,
CORJIT_FLAG_UNUSED19 = 46,
CORJIT_FLAG_UNUSED20 = 47,
CORJIT_FLAG_UNUSED21 = 48,
CORJIT_FLAG_UNUSED22 = 49,
CORJIT_FLAG_UNUSED23 = 50,
CORJIT_FLAG_UNUSED24 = 51,
CORJIT_FLAG_UNUSED25 = 52,
CORJIT_FLAG_UNUSED26 = 53,
CORJIT_FLAG_UNUSED27 = 54,
CORJIT_FLAG_UNUSED28 = 55,
CORJIT_FLAG_UNUSED29 = 56,
CORJIT_FLAG_UNUSED30 = 57,
CORJIT_FLAG_UNUSED31 = 58,
CORJIT_FLAG_UNUSED32 = 59,
CORJIT_FLAG_UNUSED33 = 60,
CORJIT_FLAG_UNUSED34 = 61,
CORJIT_FLAG_UNUSED35 = 62,
CORJIT_FLAG_UNUSED36 = 63
};

CORJIT_FLAGS()
Expand Down
Loading

0 comments on commit a16a7d6

Please sign in to comment.