diff options
| author | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-12-10 10:36:34 +0000 |
|---|---|---|
| committer | Richard Sandiford <rsandifo@linux.vnet.ibm.com> | 2013-12-10 10:36:34 +0000 |
| commit | 9afe613d121c99e66ca2224dcb426604867151e3 (patch) | |
| tree | e46fdce4d40c4bb4c63c81edfc3b4fa386a35d80 /llvm/lib/Target/SystemZ/SystemZOperators.td | |
| parent | b00a0e2971f5fbc1c069dbc4b4019ed5ca304fe9 (diff) | |
| download | bcm5719-llvm-9afe613d121c99e66ca2224dcb426604867151e3.tar.gz bcm5719-llvm-9afe613d121c99e66ca2224dcb426604867151e3.zip | |
Add TargetLowering::prepareVolatileOrAtomicLoad
One unusual feature of the z architecture is that the result of a
previous load can be reused indefinitely for subsequent loads, even if
a cache-coherent store to that location is performed by another CPU.
A special serializing instruction must be used if you want to force
a load to be reattempted.
Since volatile loads are not supposed to be omitted in this way,
we should insert a serializing instruction before each such load.
The same goes for atomic loads.
The patch implements this at the IR->DAG boundary, in a similar way
to atomic fences. It is a no-op for targets other than SystemZ.
llvm-svn: 196905
Diffstat (limited to 'llvm/lib/Target/SystemZ/SystemZOperators.td')
| -rw-r--r-- | llvm/lib/Target/SystemZ/SystemZOperators.td | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZOperators.td b/llvm/lib/Target/SystemZ/SystemZOperators.td index 31cabaa3413..771fbc32f3c 100644 --- a/llvm/lib/Target/SystemZ/SystemZOperators.td +++ b/llvm/lib/Target/SystemZ/SystemZOperators.td @@ -119,6 +119,9 @@ def z_sdivrem64 : SDNode<"SystemZISD::SDIVREM64", SDT_ZGR128Binary64>; def z_udivrem32 : SDNode<"SystemZISD::UDIVREM32", SDT_ZGR128Binary32>; def z_udivrem64 : SDNode<"SystemZISD::UDIVREM64", SDT_ZGR128Binary64>; +def z_serialize : SDNode<"SystemZISD::SERIALIZE", SDTNone, + [SDNPHasChain, SDNPMayStore]>; + class AtomicWOp<string name, SDTypeProfile profile = SDT_ZAtomicLoadBinaryW> : SDNode<"SystemZISD::"##name, profile, [SDNPHasChain, SDNPMayStore, SDNPMayLoad, SDNPMemOperand]>; |

