diff options
author | Carol Eidt <carol.eidt@microsoft.com> | 2019-03-28 11:23:10 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-28 11:23:10 -0700 |
commit | 3d4a1d5cea0ae71eed1482990ce6e575049829d8 (patch) | |
tree | fd3ea00fbd67bec2b6f6ec0966ef2bd34ea0c01d /src/jit/gentree.h | |
parent | a32f7e6b176fc18973581d48d919112d66e321aa (diff) | |
download | coreclr-3d4a1d5cea0ae71eed1482990ce6e575049829d8.tar.gz coreclr-3d4a1d5cea0ae71eed1482990ce6e575049829d8.tar.bz2 coreclr-3d4a1d5cea0ae71eed1482990ce6e575049829d8.zip |
Struct & SIMD improvements (#22255)
* [WIP] Struct & SIMD improvements
- Enable CSE of struct values when handle is available (and add code to get the handle of HW SIMD types)
- Don't require block nodes for SIMD assignments
- Don't set `GTF_GLOB_REF` on `GT_OBJ` if it is local
- Set `lvRegStruct` on promoted SIMD fields
- Add tests for #19910 (fixed with this PR) and #3539 & #19438 (fixed with #21314)
- Additional cleanup
Fix #19910
Diffstat (limited to 'src/jit/gentree.h')
-rw-r--r-- | src/jit/gentree.h | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/src/jit/gentree.h b/src/jit/gentree.h index ef3bca2667..6893c35ce4 100644 --- a/src/jit/gentree.h +++ b/src/jit/gentree.h @@ -4712,22 +4712,28 @@ struct GenTreeObj : public GenTreeBlk } } + void Init() + { + // By default, an OBJ is assumed to be a global reference, unless it is local. + GenTreeLclVarCommon* lcl = Addr()->IsLocalAddrExpr(); + if ((lcl == nullptr) || ((lcl->gtFlags & GTF_GLOB_EFFECT) != 0)) + { + gtFlags |= GTF_GLOB_REF; + } + noway_assert(gtClass != NO_CLASS_HANDLE); + _gtGcPtrCount = UINT32_MAX; + } + GenTreeObj(var_types type, GenTree* addr, CORINFO_CLASS_HANDLE cls, unsigned size) : GenTreeBlk(GT_OBJ, type, addr, size), gtClass(cls) { - // By default, an OBJ is assumed to be a global reference. - gtFlags |= GTF_GLOB_REF; - noway_assert(cls != NO_CLASS_HANDLE); - _gtGcPtrCount = UINT32_MAX; + Init(); } GenTreeObj(var_types type, GenTree* addr, GenTree* data, CORINFO_CLASS_HANDLE cls, unsigned size) : GenTreeBlk(GT_STORE_OBJ, type, addr, data, size), gtClass(cls) { - // By default, an OBJ is assumed to be a global reference. - gtFlags |= GTF_GLOB_REF; - noway_assert(cls != NO_CLASS_HANDLE); - _gtGcPtrCount = UINT32_MAX; + Init(); } #if DEBUGGABLE_GENTREE |