summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Sullivan <briansul@microsoft.com>2018-07-12 11:11:31 -0700
committerBrian Sullivan <briansul@microsoft.com>2018-07-12 11:11:31 -0700
commit8747e2dc98d46d8fbc3c0677cf5d40c05533b3ce (patch)
tree8b036a55c3da19df64201d55d4d92d71fe06f657
parentc82bd22d4bab4369c0989a1c2ca2758d29a0da36 (diff)
downloadcoreclr-8747e2dc98d46d8fbc3c0677cf5d40c05533b3ce.tar.gz
coreclr-8747e2dc98d46d8fbc3c0677cf5d40c05533b3ce.tar.bz2
coreclr-8747e2dc98d46d8fbc3c0677cf5d40c05533b3ce.zip
Include the processor atomic operations in the OperIsStore category
THe atomic operations are GT_CMPXCHG, GT_LOCKADD, GT_XCHG, GT_XADD
-rw-r--r--src/jit/gentree.h18
-rw-r--r--src/jit/sideeffects.cpp2
2 files changed, 10 insertions, 10 deletions
diff --git a/src/jit/gentree.h b/src/jit/gentree.h
index 3078b77728..3bddf61077 100644
--- a/src/jit/gentree.h
+++ b/src/jit/gentree.h
@@ -1463,25 +1463,25 @@ public:
bool OperIsImplicitIndir() const;
- bool OperIsStore() const
+ static bool OperIsAtomicOp(genTreeOps gtOper)
{
- return OperIsStore(gtOper);
+ return (gtOper == GT_XADD || gtOper == GT_XCHG || gtOper == GT_LOCKADD || gtOper == GT_CMPXCHG);
}
- static bool OperIsStore(genTreeOps gtOper)
+ bool OperIsAtomicOp() const
{
- return (gtOper == GT_STOREIND || gtOper == GT_STORE_LCL_VAR || gtOper == GT_STORE_LCL_FLD ||
- gtOper == GT_STORE_BLK || gtOper == GT_STORE_OBJ || gtOper == GT_STORE_DYN_BLK);
+ return OperIsAtomicOp(gtOper);
}
- static bool OperIsAtomicOp(genTreeOps gtOper)
+ bool OperIsStore() const
{
- return (gtOper == GT_XADD || gtOper == GT_XCHG || gtOper == GT_LOCKADD || gtOper == GT_CMPXCHG);
+ return OperIsStore(gtOper);
}
- bool OperIsAtomicOp() const
+ static bool OperIsStore(genTreeOps gtOper)
{
- return OperIsAtomicOp(gtOper);
+ return (gtOper == GT_STOREIND || gtOper == GT_STORE_LCL_VAR || gtOper == GT_STORE_LCL_FLD ||
+ OperIsStoreBlk(gtOper) || OperIsAtomicOp(gtOper));
}
// This is here for cleaner FEATURE_SIMD #ifdefs.
diff --git a/src/jit/sideeffects.cpp b/src/jit/sideeffects.cpp
index 931ee6f8f4..6821ab5297 100644
--- a/src/jit/sideeffects.cpp
+++ b/src/jit/sideeffects.cpp
@@ -165,7 +165,7 @@ AliasSet::NodeInfo::NodeInfo(Compiler* compiler, GenTree* node)
isWrite = true;
node = node->gtGetOp1();
}
- else if (node->OperIsStore() || node->OperIsAtomicOp())
+ else if (node->OperIsStore())
{
isWrite = true;
}