Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 2 additions & 8 deletions src/coreclr/jit/earlyprop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,8 @@ void Compiler::optCheckFlagsAreSet(unsigned methodFlag,
// optEarlyProp: The entry point of the early value propagation.
//
// Notes:
// This phase performs an SSA-based value propagation, including
// 1. Array length propagation.
// 2. Runtime type handle propagation.
// 3. Null check folding.
// This phase performs an SSA-based value propagation, including array
// length propagation and null check folding.
//
// For array length propagation, a demand-driven SSA-based backwards tracking of constant
// array lengths is performed at each array length reference site which is in form of a
Expand All @@ -83,10 +81,6 @@ void Compiler::optCheckFlagsAreSet(unsigned methodFlag,
// GT_ARR_LENGTH node will then be rewritten to a GT_CNS_INT node if the array length is
// constant.
//
// Similarly, the same algorithm also applies to rewriting a method table (also known as
// vtable) reference site which is in form of GT_INDIR node. The base pointer, which is
// an object reference pointer, is treated in the same way as an array reference pointer.
//
// Null check folding tries to find GT_INDIR(obj + const) that GT_NULLCHECK(obj) can be folded into
// and removed. Currently, the algorithm only matches GT_INDIR and GT_NULLCHECK in the same basic block.

Expand Down
3 changes: 2 additions & 1 deletion src/coreclr/jit/gentree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13866,7 +13866,8 @@ GenTree* Compiler::gtTryRemoveBoxUpstreamEffects(GenTree* op, BoxRemovalOptions
if (options == BR_REMOVE_AND_NARROW || options == BR_REMOVE_AND_NARROW_WANT_TYPE_HANDLE)
{
JITDUMP(" to read first byte of struct via modified [%06u]\n", dspTreeID(copySrc));
gtChangeOperToNullCheck(copySrc, compCurBB);
copySrc->ChangeOper(GT_IND);
copySrc->ChangeType(TYP_BYTE);
}
else
{
Expand Down