Skip to content

Commit 7f7e795

Browse files
author
Sergey Andreenko
authored
2 small cleanup: 2 printf formatiing typos and 1 function header. (#39321)
* Fix 2 cases of wrong prinf formatting. old typos. * Change `fgIsIndirOfAddrOfLocal` return type to the precise.
1 parent 5cef42e commit 7f7e795

File tree

3 files changed

+11
-9
lines changed

3 files changed

+11
-9
lines changed

src/coreclr/src/jit/compiler.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7611,7 +7611,7 @@ class Compiler
76117611

76127612
// If "tree" is a indirection (GT_IND, or GT_OBJ) whose arg is an ADDR, whose arg is a LCL_VAR, return that LCL_VAR
76137613
// node, else NULL.
7614-
static GenTree* fgIsIndirOfAddrOfLocal(GenTree* tree);
7614+
static GenTreeLclVar* fgIsIndirOfAddrOfLocal(GenTree* tree);
76157615

76167616
// This map is indexed by GT_OBJ nodes that are address of promoted struct variables, which
76177617
// have been annotated with the GTF_VAR_DEATH flag. If such a node is *not* mapped in this

src/coreclr/src/jit/flowgraph.cpp

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7299,13 +7299,15 @@ bool Compiler::fgIsCommaThrow(GenTree* tree, bool forFolding /* = false */)
72997299
// tree - The tree node under consideration
73007300
//
73017301
// Return Value:
7302-
// If "tree" is a indirection (GT_IND, GT_BLK, or GT_OBJ) whose arg is an ADDR,
7303-
// whose arg in turn is a LCL_VAR, return that LCL_VAR node, else nullptr.
7302+
// If "tree" is a indirection (GT_IND, GT_BLK, or GT_OBJ) whose arg is:
7303+
// - an ADDR, whose arg in turn is a LCL_VAR, return that LCL_VAR node;
7304+
// - a LCL_VAR_ADDR, return that LCL_VAR_ADDR;
7305+
// - else nullptr.
73047306
//
73057307
// static
7306-
GenTree* Compiler::fgIsIndirOfAddrOfLocal(GenTree* tree)
7308+
GenTreeLclVar* Compiler::fgIsIndirOfAddrOfLocal(GenTree* tree)
73077309
{
7308-
GenTree* res = nullptr;
7310+
GenTreeLclVar* res = nullptr;
73097311
if (tree->OperIsIndir())
73107312
{
73117313
GenTree* addr = tree->AsIndir()->Addr();
@@ -7338,12 +7340,12 @@ GenTree* Compiler::fgIsIndirOfAddrOfLocal(GenTree* tree)
73387340
GenTree* lclvar = addr->AsOp()->gtOp1;
73397341
if (lclvar->OperGet() == GT_LCL_VAR)
73407342
{
7341-
res = lclvar;
7343+
res = lclvar->AsLclVar();
73427344
}
73437345
}
73447346
else if (addr->OperGet() == GT_LCL_VAR_ADDR)
73457347
{
7346-
res = addr;
7348+
res = addr->AsLclVar();
73477349
}
73487350
}
73497351
return res;
@@ -7458,7 +7460,7 @@ GenTreeCall* Compiler::fgGetStaticsCCtorHelper(CORINFO_CLASS_HANDLE cls, CorInfo
74587460
NamedIntrinsic ni = lookupNamedIntrinsic(info.compMethodHnd);
74597461
if (ni == NI_System_Collections_Generic_EqualityComparer_get_Default)
74607462
{
7461-
JITDUMP("\nmarking helper call [06%u] as special dce...\n", result->gtTreeID);
7463+
JITDUMP("\nmarking helper call [%06u] as special dce...\n", result->gtTreeID);
74627464
result->gtCallMoreFlags |= GTF_CALL_M_HELPER_SPECIAL_DCE;
74637465
}
74647466
}

src/coreclr/src/jit/lower.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4983,7 +4983,7 @@ GenTree* Lowering::LowerAdd(GenTreeOp* node)
49834983
GenTree* next = node->gtNext;
49844984
BlockRange().Remove(op2);
49854985
BlockRange().Remove(node);
4986-
JITDUMP("Remove [06%u], [06%u]\n", op2->gtTreeID, node->gtTreeID);
4986+
JITDUMP("Remove [%06u], [%06u]\n", op2->gtTreeID, node->gtTreeID);
49874987
return next;
49884988
}
49894989

0 commit comments

Comments
 (0)