Skip to content

Commit

Permalink
Extract LowerBlockStoreCommon.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergey Andreenko committed Jun 25, 2020
1 parent d8821cc commit f642505
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
18 changes: 15 additions & 3 deletions src/coreclr/src/jit/lower.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ GenTree* Lowering::LowerNode(GenTree* node)
}
__fallthrough;
case GT_STORE_DYN_BLK:
LowerBlockStore(node->AsBlk());
LowerBlockStoreCommon(node->AsBlk());
break;

case GT_LCLHEAP:
Expand Down Expand Up @@ -3115,7 +3115,7 @@ void Lowering::LowerStoreLocCommon(GenTreeLclVarCommon* lclStore)
objStore->SetAddr(addr);
objStore->SetData(src);
BlockRange().InsertBefore(objStore, addr);
LowerBlockStore(objStore);
LowerBlockStoreCommon(objStore);
return;
}
}
Expand Down Expand Up @@ -3441,7 +3441,7 @@ void Lowering::LowerStoreCallStruct(GenTreeBlk* store)

GenTreeLclVar* spilledCall = SpillStructCallResult(call);
store->SetData(spilledCall);
LowerBlockStore(store);
LowerBlockStoreCommon(store);
#endif // WINDOWS_AMD64_ABI
}
}
Expand Down Expand Up @@ -6397,3 +6397,15 @@ void Lowering::LowerIndir(GenTreeIndir* ind)
TryCreateAddrMode(ind->Addr(), false);
}
}

//------------------------------------------------------------------------
// LowerBlockStoreCommon: a common logic to lower STORE_OBJ/BLK/DYN_BLK.
//
// Arguments:
// blkNode - the store blk/obj node we are lowering.
//
void Lowering::LowerBlockStoreCommon(GenTreeBlk* blkNode)
{
assert(blkNode->OperIs(GT_STORE_BLK, GT_STORE_DYN_BLK, GT_STORE_OBJ));
LowerBlockStore(blkNode);
}
1 change: 1 addition & 0 deletions src/coreclr/src/jit/lower.h
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,7 @@ class Lowering final : public Phase
GenTree* LowerConstIntDivOrMod(GenTree* node);
GenTree* LowerSignedDivOrMod(GenTree* node);
void LowerBlockStore(GenTreeBlk* blkNode);
void LowerBlockStoreCommon(GenTreeBlk* blkNode);
void ContainBlockStoreAddress(GenTreeBlk* blkNode, unsigned size, GenTree* addr);
void LowerPutArgStk(GenTreePutArgStk* tree);

Expand Down

0 comments on commit f642505

Please sign in to comment.