Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/dotnet/runtime.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSingleAccretion <62474226+SingleAccretion@users.noreply.github.com>2021-07-09 00:15:20 +0300
committerGitHub <noreply@github.com>2021-07-09 00:15:20 +0300
commitfdbca22b23727ec640666d385b3c41ffe4b7b914 (patch)
tree32f48746472870c19c662c158ba5f852bf8421a0 /src/coreclr/jit
parentf3b777546cceaeea7693b22a16bc08c797ec38bc (diff)
Don't use GT_ARR_ELEM as a location/value (#54780)
* Don't use GT_ARR_ELEM as a location It represents an address. No diffs. * Clarify the purpose of GenTreeArrElem
Diffstat (limited to 'src/coreclr/jit')
-rw-r--r--src/coreclr/jit/assertionprop.cpp7
-rw-r--r--src/coreclr/jit/gcinfo.cpp1
-rw-r--r--src/coreclr/jit/gentree.h8
-rw-r--r--src/coreclr/jit/morph.cpp1
4 files changed, 4 insertions, 13 deletions
diff --git a/src/coreclr/jit/assertionprop.cpp b/src/coreclr/jit/assertionprop.cpp
index fb869c89fee..ffad32a61b2 100644
--- a/src/coreclr/jit/assertionprop.cpp
+++ b/src/coreclr/jit/assertionprop.cpp
@@ -1248,13 +1248,6 @@ AssertionIndex Compiler::optCreateAssertion(GenTree* op1,
toType = op2->gtType;
goto SUBRANGE_COMMON;
- case GT_ARR_ELEM:
-
- /* Assigning the result of an indirection into a LCL_VAR, see if we can add a subrange assertion */
-
- toType = op2->gtType;
- goto SUBRANGE_COMMON;
-
case GT_LCL_FLD:
/* Assigning the result of an indirection into a LCL_VAR, see if we can add a subrange assertion */
diff --git a/src/coreclr/jit/gcinfo.cpp b/src/coreclr/jit/gcinfo.cpp
index 1b4d50fe875..cc8e1cd585f 100644
--- a/src/coreclr/jit/gcinfo.cpp
+++ b/src/coreclr/jit/gcinfo.cpp
@@ -272,7 +272,6 @@ GCInfo::WriteBarrierForm GCInfo::gcIsWriteBarrierCandidate(GenTree* tgt, GenTree
case GT_LEA:
return gcWriteBarrierFormFromTargetAddress(tgt->AsAddrMode()->Base());
- case GT_ARR_ELEM: /* Definitely in the managed heap */
case GT_CLS_VAR:
return WBF_BarrierUnchecked;
diff --git a/src/coreclr/jit/gentree.h b/src/coreclr/jit/gentree.h
index b0439564688..c12e46f02bd 100644
--- a/src/coreclr/jit/gentree.h
+++ b/src/coreclr/jit/gentree.h
@@ -5366,9 +5366,9 @@ struct GenTreeBoundsChk : public GenTree
}
};
-// gtArrElem -- general array element (GT_ARR_ELEM), for non "SZ_ARRAYS"
-// -- multidimensional arrays, or 1-d arrays with non-zero lower bounds.
-
+// GenTreeArrElem - bounds checked address (byref) of a general array element,
+// for multidimensional arrays, or 1-d arrays with non-zero lower bounds.
+//
struct GenTreeArrElem : public GenTree
{
GenTree* gtArrObj;
@@ -5384,7 +5384,7 @@ struct GenTreeArrElem : public GenTree
// This has caused VSW 571394.
var_types gtArrElemType; // The array element type
- // Requires that "inds" is a pointer to an array of "rank" GenTreePtrs for the indices.
+ // Requires that "inds" is a pointer to an array of "rank" nodes for the indices.
GenTreeArrElem(
var_types type, GenTree* arr, unsigned char rank, unsigned char elemSize, var_types elemType, GenTree** inds)
: GenTree(GT_ARR_ELEM, type), gtArrObj(arr), gtArrRank(rank), gtArrElemSize(elemSize), gtArrElemType(elemType)
diff --git a/src/coreclr/jit/morph.cpp b/src/coreclr/jit/morph.cpp
index 2b40d8548c6..9f734adaa71 100644
--- a/src/coreclr/jit/morph.cpp
+++ b/src/coreclr/jit/morph.cpp
@@ -639,7 +639,6 @@ OPTIMIZECAST:
case GT_IND:
case GT_CLS_VAR:
case GT_LCL_FLD:
- case GT_ARR_ELEM:
oper->gtType = dstType;
// We're changing the type here so we need to update the VN;
// in other cases we discard the cast without modifying oper