1
0
Fork 0
mirror of https://github.com/VSadov/Satori.git synced 2025-06-10 10:00:57 +09:00

Remove GT_STORE_DYN_BLK (#98905)

This commit is contained in:
Egor Bogatov 2024-02-27 11:31:21 +01:00 committed by GitHub
parent 173da891e4
commit 51b51bffbb
Signed by: github
GPG key ID: B5690EEEBB952194
39 changed files with 65 additions and 540 deletions

View file

@ -9573,8 +9573,8 @@ const uint8_t ValueNumStore::s_vnfOpAttribs[VNF_COUNT] = {
static genTreeOps genTreeOpsIllegalAsVNFunc[] = {GT_IND, // When we do heap memory.
GT_NULLCHECK, GT_QMARK, GT_COLON, GT_LOCKADD, GT_XADD, GT_XCHG,
GT_CMPXCHG, GT_LCLHEAP, GT_BOX, GT_XORR, GT_XAND, GT_STORE_DYN_BLK,
GT_STORE_LCL_VAR, GT_STORE_LCL_FLD, GT_STOREIND, GT_STORE_BLK,
GT_CMPXCHG, GT_LCLHEAP, GT_BOX, GT_XORR, GT_XAND, GT_STORE_LCL_VAR,
GT_STORE_LCL_FLD, GT_STOREIND, GT_STORE_BLK,
// These need special semantics:
GT_COMMA, // == second argument (but with exception(s) from first).
GT_ARR_ADDR, GT_BOUNDS_CHECK,
@ -11488,12 +11488,7 @@ void Compiler::fgValueNumberTree(GenTree* tree)
unsigned loadSize = tree->AsIndir()->Size();
VNFuncApp funcApp{VNF_COUNT};
// TODO-1stClassStructs: delete layout-less "IND(struct)" nodes and the "loadSize == 0" condition.
if (loadSize == 0)
{
tree->gtVNPair.SetBoth(vnStore->VNForExpr(compCurBB, loadType));
}
else if (fgValueNumberConstLoad(tree->AsIndir()))
if (fgValueNumberConstLoad(tree->AsIndir()))
{
// VN is assigned inside fgValueNumberConstLoad
}
@ -11760,30 +11755,6 @@ void Compiler::fgValueNumberTree(GenTree* tree)
break;
#endif // FEATURE_HW_INTRINSICS
case GT_STORE_DYN_BLK:
{
// Conservatively, mutate the heaps - we don't analyze these rare stores.
// Likewise, any locals possibly defined by them we mark as address-exposed.
fgMutateGcHeap(tree DEBUGARG("dynamic block store"));
GenTreeStoreDynBlk* store = tree->AsStoreDynBlk();
ValueNumPair vnpExcSet = ValueNumStore::VNPForEmptyExcSet();
// Propagate the exceptions...
vnpExcSet = vnStore->VNPUnionExcSet(store->Addr()->gtVNPair, vnpExcSet);
vnpExcSet = vnStore->VNPUnionExcSet(store->Data()->gtVNPair, vnpExcSet);
vnpExcSet = vnStore->VNPUnionExcSet(store->gtDynamicSize->gtVNPair, vnpExcSet);
// This is a store, it produces no value. Thus we use VNPForVoid().
store->gtVNPair = vnStore->VNPWithExc(vnStore->VNPForVoid(), vnpExcSet);
// Note that we are only adding the exception for the destination address.
// Currently, "Data()" is an explicit indirection in case this is a "cpblk".
assert(store->Data()->gtEffectiveVal()->OperIsIndir() || store->OperIsInitBlkOp());
fgValueNumberAddExceptionSetForIndirection(store, store->Addr());
break;
}
case GT_CMPXCHG: // Specialop
{
// For CMPXCHG and other intrinsics add an arbitrary side effect on GcHeap/ByrefExposed.