diff options
author | Simon Atanasyan <simon@atanasyan.com> | 2019-07-03 12:27:58 +0000 |
---|---|---|
committer | Simon Atanasyan <simon@atanasyan.com> | 2019-07-03 12:27:58 +0000 |
commit | 4d364659f9d76daa74fda78bf7a21bdfc0056460 (patch) | |
tree | 9bdd914965115e1593835d31b1f4b4cc9c680860 | |
parent | 3e4c7eb33ef42aafad6b1c2beb176af829a1370b (diff) | |
download | bcm5719-llvm-4d364659f9d76daa74fda78bf7a21bdfc0056460.tar.gz bcm5719-llvm-4d364659f9d76daa74fda78bf7a21bdfc0056460.zip |
[mips] Add missing atomic instructions to general scheduling definitions
llvm-svn: 365033
-rw-r--r-- | llvm/lib/Target/Mips/MipsScheduleGeneric.td | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/lib/Target/Mips/MipsScheduleGeneric.td b/llvm/lib/Target/Mips/MipsScheduleGeneric.td index 137087e3bf9..58a7b0b38d2 100644 --- a/llvm/lib/Target/Mips/MipsScheduleGeneric.td +++ b/llvm/lib/Target/Mips/MipsScheduleGeneric.td @@ -1595,4 +1595,20 @@ def : InstRW<[GenericWriteFPUStore], (instregex "^ST_[BHWD]$")>; def : InstRW<[GenericWriteFPUStore], (instrs ST_F16)>; def : InstRW<[GenericWriteFPULoad], (instregex "^LD_[BHWD]$")>; def : InstRW<[GenericWriteFPULoad], (instrs LD_F16)>; + +// Atomic instructions + +// FIXME: Define `WriteAtomic` in the MipsSchedule.td and +// attach it to the Atomic2OpsPostRA, AtomicCmpSwapPostRA, ... +// classes. Then just define resources for the `WriteAtomic` in each +// machine models. +def GenericAtomic : ProcResource<1> { let BufferSize = 1; } +def GenericWriteAtomic : SchedWriteRes<[GenericAtomic]> { let Latency = 2; } + +def : InstRW<[GenericWriteAtomic], + (instregex "^ATOMIC_SWAP_I(8|16|32|64)_POSTRA$")>; +def : InstRW<[GenericWriteAtomic], + (instregex "^ATOMIC_CMP_SWAP_I(8|16|32|64)_POSTRA$")>; +def : InstRW<[GenericWriteAtomic], + (instregex "^ATOMIC_LOAD_(ADD|SUB|AND|OR|XOR|NAND)_I(8|16|32|64)_POSTRA$")>; } |