Skip to content

Commit 574c48c

Browse files
authored
Remove unnecessary GcInfoEncoder::DoNotTrackInPartiallyInterruptible (#113078)
Also run superpmi-asmdiffs on gcinfo source changes
1 parent 1895e05 commit 574c48c

File tree

4 files changed

+6
-102
lines changed

4 files changed

+6
-102
lines changed

eng/pipelines/coreclr/superpmi-diffs.yml

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ pr:
2121
# so that this build can block dependency auto-updates (this build is currently ignored)
2222
include:
2323
- src/coreclr/jit/*
24+
- src/coreclr/gcinfo/*
2425

2526
variables:
2627
- template: /eng/pipelines/common/variables.yml

eng/pipelines/coreclr/superpmi-replay.yml

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ pr:
1111
paths:
1212
include:
1313
- src/coreclr/jit/*
14+
- src/coreclr/gcinfo/*
1415
- src/coreclr/tools/superpmi/*
1516
exclude:
1617
- src/coreclr/inc/jiteeversionguid.h

src/coreclr/gcinfo/gcinfoencoder.cpp

+4-98
Original file line numberDiff line numberDiff line change
@@ -909,97 +909,6 @@ void GcInfoEncoder::FinalizeSlotIds()
909909
#endif
910910
}
911911

912-
#ifdef PARTIALLY_INTERRUPTIBLE_GC_SUPPORTED
913-
914-
// tells whether a slot cannot contain an object reference
915-
// at call instruction or right after returning
916-
bool GcInfoEncoder::DoNotTrackInPartiallyInterruptible(GcSlotDesc &slotDesc)
917-
{
918-
#if defined(TARGET_ARM)
919-
920-
_ASSERTE( m_SizeOfStackOutgoingAndScratchArea != (UINT32)-1 );
921-
if(slotDesc.IsRegister())
922-
{
923-
int regNum = (int) slotDesc.Slot.RegisterNumber;
924-
_ASSERTE(regNum >= 0 && regNum <= 14);
925-
_ASSERTE(regNum != 13); // sp
926-
927-
return ((regNum <= 3) || (regNum >= 12)) // R12 is volatile and SP/LR can't contain objects around calls
928-
&& regNum != 0 // R0 can contain return value
929-
;
930-
}
931-
else if (!slotDesc.IsUntracked() && (slotDesc.Slot.Stack.Base == GC_SP_REL) &&
932-
((UINT32)slotDesc.Slot.Stack.SpOffset < m_SizeOfStackOutgoingAndScratchArea))
933-
{
934-
return TRUE;
935-
}
936-
else
937-
return FALSE;
938-
939-
#elif defined(TARGET_ARM64)
940-
941-
_ASSERTE(m_SizeOfStackOutgoingAndScratchArea != (UINT32)-1);
942-
if (slotDesc.IsRegister())
943-
{
944-
int regNum = (int)slotDesc.Slot.RegisterNumber;
945-
_ASSERTE(regNum >= 0 && regNum <= 30);
946-
_ASSERTE(regNum != 18);
947-
948-
return (regNum <= 17 || regNum >= 29) // X0 through X17 are scratch, FP/LR can't be used for objects around calls
949-
&& regNum != 0 // X0 can contain return value
950-
&& regNum != 1 // X1 can contain return value
951-
;
952-
}
953-
else if (!slotDesc.IsUntracked() && (slotDesc.Slot.Stack.Base == GC_SP_REL) &&
954-
((UINT32)slotDesc.Slot.Stack.SpOffset < m_SizeOfStackOutgoingAndScratchArea))
955-
{
956-
return TRUE;
957-
}
958-
else
959-
return FALSE;
960-
961-
#elif defined(TARGET_AMD64)
962-
963-
_ASSERTE( m_SizeOfStackOutgoingAndScratchArea != (UINT32)-1 );
964-
if(slotDesc.IsRegister())
965-
{
966-
int regNum = (int) slotDesc.Slot.RegisterNumber;
967-
_ASSERTE(regNum >= 0 && regNum <= 16);
968-
_ASSERTE(regNum != 4); // rsp
969-
970-
UINT16 PreservedRegMask =
971-
(1 << 3) // rbx
972-
| (1 << 5) // rbp
973-
#ifndef UNIX_AMD64_ABI
974-
| (1 << 6) // rsi
975-
| (1 << 7) // rdi
976-
#endif // UNIX_AMD64_ABI
977-
| (1 << 12) // r12
978-
| (1 << 13) // r13
979-
| (1 << 14) // r14
980-
| (1 << 15) // r15
981-
| (1 << 0) // rax - may contain return value
982-
#ifdef UNIX_AMD64_ABI
983-
| (1 << 2) // rdx - may contain return value
984-
#endif
985-
;
986-
987-
return !(PreservedRegMask & (1 << regNum));
988-
}
989-
else if (!slotDesc.IsUntracked() && (slotDesc.Slot.Stack.Base == GC_SP_REL) &&
990-
((UINT32)slotDesc.Slot.Stack.SpOffset < m_SizeOfStackOutgoingAndScratchArea))
991-
{
992-
return TRUE;
993-
}
994-
else
995-
return FALSE;
996-
997-
#else
998-
return FALSE;
999-
#endif
1000-
}
1001-
#endif // PARTIALLY_INTERRUPTIBLE_GC_SUPPORTED
1002-
1003912
void GcInfoEncoder::Build()
1004913
{
1005914
#ifdef _DEBUG
@@ -1389,14 +1298,11 @@ void GcInfoEncoder::Build()
13891298
else
13901299
{
13911300
UINT32 slotIndex = pCurrent->SlotId;
1392-
if(!DoNotTrackInPartiallyInterruptible(m_SlotTable[slotIndex]))
1393-
{
1394-
BYTE becomesLive = pCurrent->BecomesLive;
1395-
_ASSERTE((liveState.ReadBit(slotIndex) && !becomesLive)
1396-
|| (!liveState.ReadBit(slotIndex) && becomesLive));
1301+
BYTE becomesLive = pCurrent->BecomesLive;
1302+
_ASSERTE((liveState.ReadBit(slotIndex) && !becomesLive)
1303+
|| (!liveState.ReadBit(slotIndex) && becomesLive));
13971304

1398-
liveState.WriteBit(slotIndex, becomesLive);
1399-
}
1305+
liveState.WriteBit(slotIndex, becomesLive);
14001306
pCurrent++;
14011307
}
14021308
}

src/coreclr/inc/gcinfoencoder.h

-4
Original file line numberDiff line numberDiff line change
@@ -542,10 +542,6 @@ class GcInfoEncoder
542542
void SizeofSlotStateVarLengthVector(const BitArray& vector, UINT32 baseSkip, UINT32 baseRun, UINT32 * pSizeofSimple, UINT32 * pSizeofRLE, UINT32 * pSizeofRLENeg);
543543
UINT32 WriteSlotStateVarLengthVector(BitStreamWriter &writer, const BitArray& vector, UINT32 baseSkip, UINT32 baseRun);
544544

545-
#ifdef PARTIALLY_INTERRUPTIBLE_GC_SUPPORTED
546-
bool DoNotTrackInPartiallyInterruptible(GcSlotDesc &slot);
547-
#endif // PARTIALLY_INTERRUPTIBLE_GC_SUPPORTED
548-
549545
// Assumes that "*ppTransitions" is has size "numTransitions", is sorted by CodeOffset then by SlotId,
550546
// and that "*ppEndTransitions" points one beyond the end of the array. If "*ppTransitions" contains
551547
// any dead/live transitions pairs for the same CodeOffset and SlotID, removes those, by allocating a

0 commit comments

Comments
 (0)