Skip to content

Commit

Permalink
Delete fgMorphBlockOperand
Browse files Browse the repository at this point in the history
  • Loading branch information
SingleAccretion committed Nov 11, 2022
1 parent 59a5171 commit c0e1eab
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 53 deletions.
1 change: 0 additions & 1 deletion src/coreclr/jit/compiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -5774,7 +5774,6 @@ class Compiler
GenTree* fgMorphLeaf(GenTree* tree);
GenTree* fgMorphOneAsgBlockOp(GenTree* tree);
GenTree* fgMorphInitBlock(GenTree* tree);
GenTree* fgMorphBlockOperand(GenTree* tree, var_types asgType);
GenTree* fgMorphCopyBlock(GenTree* tree);
GenTree* fgMorphStoreDynBlock(GenTreeStoreDynBlk* tree);
GenTree* fgMorphSmpOp(GenTree* tree, MorphAddrContext* mac, bool* optAssertionPropDone = nullptr);
Expand Down
52 changes: 0 additions & 52 deletions src/coreclr/jit/morph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8739,58 +8739,6 @@ GenTree* Compiler::fgMorphOneAsgBlockOp(GenTree* tree)
return tree;
}

//------------------------------------------------------------------------
// fgMorphBlockOperand: Retype an operand of a block assignment
//
// Arguments:
// tree - The block operand
// asgType - The (new) scalar type of the assignment
//
// Return Value:
// Returns the morphed block operand
//
GenTree* Compiler::fgMorphBlockOperand(GenTree* tree, var_types asgType)
{
assert(asgType != TYP_STRUCT);

GenTree* effectiveVal = tree->gtEffectiveVal();
unsigned blockWidth = genTypeSize(asgType);

if (effectiveVal->OperIsIndir())
{
GenTree* addr = effectiveVal->AsIndir()->Addr();
if ((addr->OperGet() == GT_ADDR) && (addr->gtGetOp1()->TypeGet() == asgType))
{
effectiveVal = addr->gtGetOp1();
}
else if (effectiveVal->OperIsBlk())
{
effectiveVal->SetOper(GT_IND);
}

effectiveVal->gtType = asgType;
}
else if (effectiveVal->TypeGet() != asgType)
{
if (effectiveVal->IsCall())
{
#ifdef DEBUG
GenTreeCall* call = effectiveVal->AsCall();
assert(call->TypeGet() == TYP_STRUCT);
assert(blockWidth == info.compCompHnd->getClassSize(call->gtRetClsHnd));
#endif
}
else
{
GenTree* addr = gtNewOperNode(GT_ADDR, TYP_BYREF, effectiveVal);
effectiveVal = gtNewIndir(asgType, addr);
}
}

assert(effectiveVal->TypeIs(asgType));
return effectiveVal;
}

#ifdef FEATURE_SIMD

//--------------------------------------------------------------------------------------------------------------
Expand Down

0 comments on commit c0e1eab

Please sign in to comment.