diff options
author | Brian Sullivan <briansul@microsoft.com> | 2018-04-06 15:30:37 -0700 |
---|---|---|
committer | Brian Sullivan <briansul@microsoft.com> | 2018-04-11 15:59:03 -0700 |
commit | 7267a57b5ee37af31538e2141d21ff557d54dd00 (patch) | |
tree | 8c23d23b92e4910c84921f63b056fd6541959556 /src/jit/liveness.cpp | |
parent | 13528d6ddcebfc6724c31c597efb5173f6eed781 (diff) | |
download | coreclr-7267a57b5ee37af31538e2141d21ff557d54dd00.tar.gz coreclr-7267a57b5ee37af31538e2141d21ff557d54dd00.tar.bz2 coreclr-7267a57b5ee37af31538e2141d21ff557d54dd00.zip |
Mutate the global heap valuenumber for any HW intrinsic that performs a memory store operation
Use fgMutateGcHeap to record memory write operations by HW Intrinsics
Set flags for the HW Intrinsic nodes that access Memory
Added support for HWIntrinsic nodes to OperMayThrow
Added support for GT_HWIntrinsic to GenTree::OperRequiresAsgFlag() and GenTree::OperIsImplicitIndir()
Refactored GenTreeHWIntrinsic::OperIsMemoryLoad() and GenTreeHWIntrinsic::OperIsMemoryStore()
Added GenTreeHWIntrinsic::OperIsMemoryLoadOrStore()
Deleted the static version of OperIsImplicitIndir(gtOper)
Diffstat (limited to 'src/jit/liveness.cpp')
-rw-r--r-- | src/jit/liveness.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/jit/liveness.cpp b/src/jit/liveness.cpp index 7ae9487ecd..a4ef055782 100644 --- a/src/jit/liveness.cpp +++ b/src/jit/liveness.cpp @@ -329,6 +329,27 @@ void Compiler::fgPerNodeLocalVarLiveness(GenTree* tree) fgCurMemoryDef |= memoryKindSet(GcHeap, ByrefExposed); break; +#ifdef FEATURE_HW_INTRINSICS + case GT_HWIntrinsic: + { + GenTreeHWIntrinsic* hwIntrinsicNode = tree->AsHWIntrinsic(); + + // We can't call fgMutateGcHeap unless the block has recorded a MemoryDef + // + if (hwIntrinsicNode->OperIsMemoryStore()) + { + // We currently handle this like a Volatile store, so it counts as a definition of GcHeap/ByrefExposed + fgCurMemoryDef |= memoryKindSet(GcHeap, ByrefExposed); + } + if (hwIntrinsicNode->OperIsMemoryLoad()) + { + // This instruction loads from memory and we need to record this information + fgCurMemoryUse |= memoryKindSet(GcHeap, ByrefExposed); + } + break; + } +#endif + // For now, all calls read/write GcHeap/ByrefExposed, writes in their entirety. Might tighten this case later. case GT_CALL: { |