Skip to content

Commit 1cd84b6

Browse files
authored
Merge branch 'release/8.0' into merge/release/8.0-rc1-to-release/8.0
2 parents 6aef01d + 90b92bb commit 1cd84b6

File tree

77 files changed

+1257
-527
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+1257
-527
lines changed

docs/project/list-of-diagnostics.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,10 @@ The diagnostic id values reserved for .NET Libraries analyzer warnings are `SYSL
142142
| __`SYSLIB1023`__ | Generating more than 6 arguments is not supported |
143143
| __`SYSLIB1024`__ | Argument is using the unsupported out parameter modifier |
144144
| __`SYSLIB1025`__ | Multiple logging methods cannot use the same event name within a class |
145-
| __`SYSLIB1026`__ | _`SYSLIB1026`-`SYSLIB1029` reserved for logging._ |
146-
| __`SYSLIB1027`__ | _`SYSLIB1026`-`SYSLIB1029` reserved for logging._ |
147-
| __`SYSLIB1028`__ | _`SYSLIB1026`-`SYSLIB1029` reserved for logging._ |
148-
| __`SYSLIB1029`__ | _`SYSLIB1026`-`SYSLIB1029` reserved for logging._ |
145+
| __`SYSLIB1026`__ | C# language version not supported by the logging source generator. |
146+
| __`SYSLIB1027`__ | _`SYSLIB1001`-`SYSLIB1029` reserved for logging._ |
147+
| __`SYSLIB1028`__ | _`SYSLIB1001`-`SYSLIB1029` reserved for logging._ |
148+
| __`SYSLIB1029`__ | _`SYSLIB1001`-`SYSLIB1029` reserved for logging._ |
149149
| __`SYSLIB1030`__ | JsonSourceGenerator did not generate serialization metadata for type |
150150
| __`SYSLIB1031`__ | JsonSourceGenerator encountered a duplicate JsonTypeInfo property name |
151151
| __`SYSLIB1032`__ | JsonSourceGenerator encountered a context class that is not partial |
@@ -250,7 +250,7 @@ The diagnostic id values reserved for .NET Libraries analyzer warnings are `SYSL
250250
| __`SYSLIB1213`__ | Options validation generator: Member potentially missing enumerable validation. |
251251
| __`SYSLIB1214`__ | Options validation generator: Can't validate constants, static fields or properties. |
252252
| __`SYSLIB1215`__ | Options validation generator: Validation attribute on the member is inaccessible from the validator type. |
253-
| __`SYSLIB1216`__ | *_`SYSLIB1201`-`SYSLIB1219` reserved for Microsoft.Extensions.Options.SourceGeneration.* |
253+
| __`SYSLIB1216`__ | C# language version not supported by the options validation source generator. |
254254
| __`SYSLIB1217`__ | *_`SYSLIB1201`-`SYSLIB1219` reserved for Microsoft.Extensions.Options.SourceGeneration.* |
255255
| __`SYSLIB1218`__ | *_`SYSLIB1201`-`SYSLIB1219` reserved for Microsoft.Extensions.Options.SourceGeneration.* |
256256
| __`SYSLIB1219`__ | *_`SYSLIB1201`-`SYSLIB1219` reserved for Microsoft.Extensions.Options.SourceGeneration.* |

eng/Versions.props

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<PackageVersionNet7>7.0.11</PackageVersionNet7>
1111
<PackageVersionNet6>6.0.$([MSBuild]::Add($([System.Version]::Parse('$(PackageVersionNet7)').Build),11))</PackageVersionNet6>
1212
<PreReleaseVersionLabel>rc</PreReleaseVersionLabel>
13-
<PreReleaseVersionIteration>1</PreReleaseVersionIteration>
13+
<PreReleaseVersionIteration>2</PreReleaseVersionIteration>
1414
<WorkloadVersionSuffix Condition="'$(PreReleaseVersionLabel)' != 'release'">-$(PreReleaseVersionLabel).$(PreReleaseVersionIteration)</WorkloadVersionSuffix>
1515
<SdkBandVersionForWorkload_FromRuntimeVersions>$(SdkBandVersion)$(WorkloadVersionSuffix)</SdkBandVersionForWorkload_FromRuntimeVersions>
1616
<!-- set to false for release branches -->

eng/native/configureplatform.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/functions.cmake)
22

33
# If set, indicates that this is not an officially supported release.
44
# Release branches should set this to false.
5-
set(PRERELEASE 1)
5+
set(PRERELEASE 0)
66

77
#----------------------------------------
88
# Detect and set platform variable names

eng/pipelines/libraries/stress/http.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ schedules:
1313
- main
1414
- release/6.0
1515
- release/7.0
16+
- release/8.0
1617

1718
variables:
1819
- template: ../variables.yml

eng/pipelines/libraries/stress/ssl.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ schedules:
1313
- main
1414
- release/6.0
1515
- release/7.0
16+
- release/8.0
1617

1718
variables:
1819
- template: ../variables.yml

src/coreclr/inc/clrconfigvalues.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,9 +574,10 @@ RETAIL_CONFIG_DWORD_INFO(UNSUPPORTED_TC_QuickJitForLoops, W("TC_QuickJitForLoops
574574
RETAIL_CONFIG_DWORD_INFO(UNSUPPORTED_TC_QuickJitForLoops, W("TC_QuickJitForLoops"), 0, "When quick JIT is enabled, quick JIT may also be used for methods that contain loops.")
575575
#endif // defined(TARGET_AMD64) || defined(TARGET_ARM64) || defined(TARGET_LOONGARCH64)
576576
RETAIL_CONFIG_DWORD_INFO(EXTERNAL_TC_AggressiveTiering, W("TC_AggressiveTiering"), 0, "Transition through tiers aggressively.")
577+
RETAIL_CONFIG_DWORD_INFO(EXTERNAL_TC_CallCountThreshold, W("TC_CallCountThreshold"), TC_CallCountThreshold, "Number of times a method must be called in tier 0 after which it is promoted to the next tier.")
578+
RETAIL_CONFIG_DWORD_INFO(EXTERNAL_TC_CallCountingDelayMs, W("TC_CallCountingDelayMs"), TC_CallCountingDelayMs, "A perpetual delay in milliseconds that is applied to call counting in tier 0 and jitting at higher tiers, while there is startup-like activity.")
579+
577580
RETAIL_CONFIG_DWORD_INFO(INTERNAL_TC_BackgroundWorkerTimeoutMs, W("TC_BackgroundWorkerTimeoutMs"), TC_BackgroundWorkerTimeoutMs, "How long in milliseconds the background worker thread may remain idle before exiting.")
578-
RETAIL_CONFIG_DWORD_INFO(INTERNAL_TC_CallCountThreshold, W("TC_CallCountThreshold"), TC_CallCountThreshold, "Number of times a method must be called in tier 0 after which it is promoted to the next tier.")
579-
RETAIL_CONFIG_DWORD_INFO(INTERNAL_TC_CallCountingDelayMs, W("TC_CallCountingDelayMs"), TC_CallCountingDelayMs, "A perpetual delay in milliseconds that is applied to call counting in tier 0 and jitting at higher tiers, while there is startup-like activity.")
580581
RETAIL_CONFIG_DWORD_INFO(INTERNAL_TC_DelaySingleProcMultiplier, W("TC_DelaySingleProcMultiplier"), TC_DelaySingleProcMultiplier, "Multiplier for TC_CallCountingDelayMs that is applied on a single-processor machine or when the process is affinitized to a single processor.")
581582
RETAIL_CONFIG_DWORD_INFO(INTERNAL_TC_CallCounting, W("TC_CallCounting"), 1, "Enabled by default (only activates when TieredCompilation is also enabled). If disabled immediately backpatches prestub, and likely prevents any promotion to higher tiers")
582583
RETAIL_CONFIG_DWORD_INFO(INTERNAL_TC_UseCallCountingStubs, W("TC_UseCallCountingStubs"), 1, "Uses call counting stubs for faster call counting.")

src/coreclr/jit/emitarm64.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16615,6 +16615,15 @@ emitter::RegisterOrder emitter::IsOptimizableLdrStrWithPair(
1661516615
emitAttr prevSize = emitLastIns->idOpSize();
1661616616
ssize_t prevImm = emitGetInsSC(emitLastIns);
1661716617

16618+
// If we have this format, the 'imm' and/or 'prevImm' are not scaled(encoded),
16619+
// therefore we cannot proceed.
16620+
// TODO: In this context, 'imm' and 'prevImm' are assumed to be scaled(encoded).
16621+
// They should never be scaled(encoded) until its about to be written to the buffer.
16622+
if (fmt == IF_LS_2C || lastInsFmt == IF_LS_2C)
16623+
{
16624+
return eRO_none;
16625+
}
16626+
1661816627
// Signed, *raw* immediate value fits in 7 bits, so for LDP/ STP the raw value is from -64 to +63.
1661916628
// For LDR/ STR, there are 9 bits, so we need to limit the range explicitly in software.
1662016629
if ((imm < -64) || (imm > 63) || (prevImm < -64) || (prevImm > 63))

src/coreclr/jit/layout.cpp

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -421,6 +421,7 @@ void ClassLayout::InitializeGCPtrs(Compiler* compiler)
421421
//
422422
// Return value:
423423
// true if at least one GC ByRef, false otherwise.
424+
//
424425
bool ClassLayout::HasGCByRef() const
425426
{
426427
unsigned slots = GetSlotCount();
@@ -435,6 +436,39 @@ bool ClassLayout::HasGCByRef() const
435436
return false;
436437
}
437438

439+
//------------------------------------------------------------------------
440+
// IntersectsGCPtr: check if the specified interval intersects with a GC
441+
// pointer.
442+
//
443+
// Parameters:
444+
// offset - The start offset of the interval
445+
// size - The size of the interval
446+
//
447+
// Return value:
448+
// True if it does.
449+
//
450+
bool ClassLayout::IntersectsGCPtr(unsigned offset, unsigned size) const
451+
{
452+
if (!HasGCPtr())
453+
{
454+
return false;
455+
}
456+
457+
unsigned startSlot = offset / TARGET_POINTER_SIZE;
458+
unsigned endSlot = (offset + size - 1) / TARGET_POINTER_SIZE;
459+
assert((startSlot < GetSlotCount()) && (endSlot < GetSlotCount()));
460+
461+
for (unsigned i = startSlot; i <= endSlot; i++)
462+
{
463+
if (IsGCPtr(i))
464+
{
465+
return true;
466+
}
467+
}
468+
469+
return false;
470+
}
471+
438472
//------------------------------------------------------------------------
439473
// AreCompatible: check if 2 layouts are the same for copying.
440474
//

src/coreclr/jit/layout.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -216,6 +216,8 @@ class ClassLayout
216216
}
217217
}
218218

219+
bool IntersectsGCPtr(unsigned offset, unsigned size) const;
220+
219221
static bool AreCompatible(const ClassLayout* layout1, const ClassLayout* layout2);
220222

221223
private:

src/coreclr/jit/promotion.cpp

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -621,6 +621,38 @@ class LocalUses
621621
bool EvaluateReplacement(
622622
Compiler* comp, unsigned lclNum, const Access& access, unsigned inducedCount, weight_t inducedCountWtd)
623623
{
624+
// Verify that this replacement has proper GC ness compared to the
625+
// layout. While reinterpreting GC fields to integers can be considered
626+
// UB, there are scenarios where it can happen safely:
627+
//
628+
// * The user code could have guarded the access with a dynamic check
629+
// that it doesn't contain a GC pointer, so that the access is actually
630+
// in dead code. This happens e.g. in span functions in SPC.
631+
//
632+
// * For byrefs, reinterpreting as an integer could be ok in a
633+
// restricted scope due to pinning.
634+
//
635+
// In theory we could allow these promotions in the restricted scope,
636+
// but currently physical promotion works on a function-wide basis.
637+
638+
LclVarDsc* lcl = comp->lvaGetDesc(lclNum);
639+
ClassLayout* layout = lcl->GetLayout();
640+
if (layout->IntersectsGCPtr(access.Offset, genTypeSize(access.AccessType)))
641+
{
642+
if (((access.Offset % TARGET_POINTER_SIZE) != 0) ||
643+
(layout->GetGCPtrType(access.Offset / TARGET_POINTER_SIZE) != access.AccessType))
644+
{
645+
return false;
646+
}
647+
}
648+
else
649+
{
650+
if (varTypeIsGC(access.AccessType))
651+
{
652+
return false;
653+
}
654+
}
655+
624656
unsigned countOverlappedCallArg = 0;
625657
unsigned countOverlappedStoredFromCall = 0;
626658

@@ -678,9 +710,8 @@ class LocalUses
678710

679711
// Now look at the overlapping struct uses that promotion will make more expensive.
680712

681-
unsigned countReadBacks = 0;
682-
weight_t countReadBacksWtd = 0;
683-
LclVarDsc* lcl = comp->lvaGetDesc(lclNum);
713+
unsigned countReadBacks = 0;
714+
weight_t countReadBacksWtd = 0;
684715
// For parameters or OSR locals we always need one read back.
685716
if (lcl->lvIsParam || lcl->lvIsOSRLocal)
686717
{

0 commit comments

Comments
 (0)