Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
SingleAccretion committed Mar 29, 2022
1 parent 643eb9e commit 7d914b9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 14 deletions.
11 changes: 3 additions & 8 deletions src/coreclr/jit/gentree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17193,7 +17193,6 @@ bool Compiler::gtIsStaticGCBaseHelperCall(GenTree* tree)
return false;
}


//------------------------------------------------------------------------
// ParseArrayAddress: Rehydrate the array and index expression from ARR_ADDR.
//
Expand Down Expand Up @@ -17222,7 +17221,7 @@ void GenTreeArrAddr::ParseArrayAddress(Compiler* comp, GenTree** pArr, ValueNum*
// OK, new we have to figure out if any part of the "offset" is a constant contribution to the index.
target_ssize_t elemOffset = GetFirstElemOffset();
unsigned elemSizeUn = (GetElemType() == TYP_STRUCT) ? comp->typGetObjLayout(GetElemClassHandle())->GetSize()
: genTypeSize(GetElemType());
: genTypeSize(GetElemType());

assert(FitsIn<target_ssize_t>(elemSizeUn));
target_ssize_t elemSize = static_cast<target_ssize_t>(elemSizeUn);
Expand Down Expand Up @@ -17296,12 +17295,8 @@ void GenTreeArrAddr::ParseArrayAddress(Compiler* comp, GenTree** pArr, ValueNum*
}
}

/* static */ void GenTreeArrAddr::ParseArrayAddressWork(GenTree* tree,
Compiler* comp,
target_ssize_t inputMul,
GenTree** pArr,
ValueNum* pInxVN,
target_ssize_t* pOffset)
/* static */ void GenTreeArrAddr::ParseArrayAddressWork(
GenTree* tree, Compiler* comp, target_ssize_t inputMul, GenTree** pArr, ValueNum* pInxVN, target_ssize_t* pOffset)
{
if (tree->TypeIs(TYP_REF))
{
Expand Down
5 changes: 2 additions & 3 deletions src/coreclr/jit/morph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5320,9 +5320,8 @@ GenTree* Compiler::fgMorphArrayIndex(GenTree* tree)
GenTree* const array = fgMorphTree(asIndex->Arr());
GenTree* const index = fgMorphTree(asIndex->Index());

GenTreeIndexAddr* const indexAddr =
new (this, GT_INDEX_ADDR) GenTreeIndexAddr(array, index, elemTyp, elemStructType, elemSize,
static_cast<unsigned>(lenOffs), elemOffs);
GenTreeIndexAddr* const indexAddr = new (this, GT_INDEX_ADDR)
GenTreeIndexAddr(array, index, elemTyp, elemStructType, elemSize, static_cast<unsigned>(lenOffs), elemOffs);
indexAddr->gtFlags |= (array->gtFlags | index->gtFlags) & GTF_ALL_EFFECT;

// Mark the indirection node as needing a range check if necessary.
Expand Down
6 changes: 3 additions & 3 deletions src/coreclr/jit/optimizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7926,9 +7926,9 @@ bool Compiler::optComputeLoopSideEffectsOfBlock(BasicBlock* blk)
ValueNum elemTypeEqVN = vnStore->VNForHandle(ssize_t(elemTypeEq), GTF_ICON_CLASS_HDL);

// Label this with a "dummy" PtrToArrElem so that we pick it up when looking at the ASG.
ValueNum ptrToArrElemVN = vnStore->VNForFunc(TYP_BYREF, VNF_PtrToArrElem, elemTypeEqVN,
vnStore->VNForNull(), vnStore->VNForNull(),
vnStore->VNForNull());
ValueNum ptrToArrElemVN =
vnStore->VNForFunc(TYP_BYREF, VNF_PtrToArrElem, elemTypeEqVN, vnStore->VNForNull(),
vnStore->VNForNull(), vnStore->VNForNull());
tree->gtVNPair.SetBoth(ptrToArrElemVN);
}
break;
Expand Down

0 comments on commit 7d914b9

Please sign in to comment.