Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 6a6627e

Browse files
author
Sergey Andreenko
committed
rename ReplaceArgWithPutArgOrBitcast
Copy was raplced with bitcast many commits ago.
1 parent 7907a97 commit 6a6627e

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

src/jit/lower.cpp

+12-11
Original file line numberDiff line numberDiff line change
@@ -768,20 +768,20 @@ GenTree* Lowering::LowerSwitch(GenTree* node)
768768
// NOTE: this method deliberately does not update the call arg table. It must only
769769
// be used by NewPutArg and LowerArg; these functions are responsible for updating
770770
// the call arg table as necessary.
771-
void Lowering::ReplaceArgWithPutArgOrCopy(GenTree** argSlot, GenTree* putArgOrCopy)
771+
void Lowering::ReplaceArgWithPutArgOrBitcast(GenTree** argSlot, GenTree* putArgOrBitcast)
772772
{
773773
assert(argSlot != nullptr);
774774
assert(*argSlot != nullptr);
775-
assert(putArgOrCopy->OperIsPutArg() || putArgOrCopy->OperIs(GT_BITCAST));
775+
assert(putArgOrBitcast->OperIsPutArg() || putArgOrBitcast->OperIs(GT_BITCAST));
776776

777777
GenTree* arg = *argSlot;
778778

779779
// Replace the argument with the putarg/copy
780-
*argSlot = putArgOrCopy;
781-
putArgOrCopy->gtOp.gtOp1 = arg;
780+
*argSlot = putArgOrBitcast;
781+
putArgOrBitcast->gtOp.gtOp1 = arg;
782782

783783
// Insert the putarg/copy into the block
784-
BlockRange().InsertAfter(arg, putArgOrCopy);
784+
BlockRange().InsertAfter(arg, putArgOrBitcast);
785785
}
786786

787787
//------------------------------------------------------------------------
@@ -1009,7 +1009,7 @@ GenTreePtr Lowering::NewPutArg(GenTreeCall* call, GenTreePtr arg, fgArgTabEntryP
10091009
fieldListPtr->gtOp.gtOp1, (ctr == 0) ? info->regNum : info->otherRegNum);
10101010

10111011
// Splice in the new GT_PUTARG_REG node in the GT_FIELD_LIST
1012-
ReplaceArgWithPutArgOrCopy(&fieldListPtr->gtOp.gtOp1, newOper);
1012+
ReplaceArgWithPutArgOrBitcast(&fieldListPtr->gtOp.gtOp1, newOper);
10131013

10141014
// Initialize all the gtRegNum's since the list won't be traversed in an LIR traversal.
10151015
fieldListPtr->gtRegNum = REG_NA;
@@ -1046,7 +1046,7 @@ GenTreePtr Lowering::NewPutArg(GenTreeCall* call, GenTreePtr arg, fgArgTabEntryP
10461046
GenTreePtr newOper = comp->gtNewPutArgReg(curTyp, curOp, argReg);
10471047

10481048
// Splice in the new GT_PUTARG_REG node in the GT_FIELD_LIST
1049-
ReplaceArgWithPutArgOrCopy(&fieldListPtr->gtOp.gtOp1, newOper);
1049+
ReplaceArgWithPutArgOrBitcast(&fieldListPtr->gtOp.gtOp1, newOper);
10501050

10511051
// Update argReg for the next putarg_reg (if any)
10521052
argReg = genRegArgNext(argReg);
@@ -1304,7 +1304,8 @@ void Lowering::LowerArg(GenTreeCall* call, GenTreePtr* ppArg)
13041304
GenTreePtr putArg = NewPutArg(call, fieldList, info, type);
13051305
putArg->gtRegNum = info->regNum;
13061306

1307-
// We can't call ReplaceArgWithPutArgOrCopy here because it presumes that we are keeping the original arg.
1307+
// We can't call ReplaceArgWithPutArgOrBitcast here because it presumes that we are keeping the original
1308+
// arg.
13081309
BlockRange().InsertBefore(arg, fieldList, putArg);
13091310
BlockRange().Remove(arg);
13101311
*ppArg = putArg;
@@ -1344,7 +1345,7 @@ void Lowering::LowerArg(GenTreeCall* call, GenTreePtr* ppArg)
13441345
if (arg != intArg)
13451346
{
13461347
info->node = intArg;
1347-
ReplaceArgWithPutArgOrCopy(ppArg, intArg);
1348+
ReplaceArgWithPutArgOrBitcast(ppArg, intArg);
13481349

13491350
// update local variable.
13501351
arg = intArg;
@@ -1362,7 +1363,7 @@ void Lowering::LowerArg(GenTreeCall* call, GenTreePtr* ppArg)
13621363
// If an extra node is returned, splice it in the right place in the tree.
13631364
if (arg != putArg)
13641365
{
1365-
ReplaceArgWithPutArgOrCopy(ppArg, putArg);
1366+
ReplaceArgWithPutArgOrBitcast(ppArg, putArg);
13661367
}
13671368
}
13681369
}
@@ -1385,7 +1386,7 @@ GenTreePtr Lowering::LowerFloatArg(GenTreePtr arg, fgArgTabEntryPtr info, unsign
13851386
GenTreePtr intNode = LowerFloatArg(node, info, fieldNum);
13861387
if (intNode != nullptr)
13871388
{
1388-
ReplaceArgWithPutArgOrCopy(list->pCurrent(), intNode);
1389+
ReplaceArgWithPutArgOrBitcast(list->pCurrent(), intNode);
13891390
list->ChangeType(intNode->TypeGet());
13901391
}
13911392
}

src/jit/lower.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ class Lowering : public Phase
151151
GenTree* LowerVirtualVtableCall(GenTreeCall* call);
152152
GenTree* LowerVirtualStubCall(GenTreeCall* call);
153153
void LowerArgsForCall(GenTreeCall* call);
154-
void ReplaceArgWithPutArgOrCopy(GenTreePtr* ppChild, GenTreePtr newNode);
154+
void ReplaceArgWithPutArgOrBitcast(GenTreePtr* ppChild, GenTreePtr newNode);
155155
GenTree* NewPutArg(GenTreeCall* call, GenTreePtr arg, fgArgTabEntryPtr info, var_types type);
156156
void LowerArg(GenTreeCall* call, GenTreePtr* ppTree);
157157
#ifdef _TARGET_ARMARCH_

0 commit comments

Comments
 (0)