[PATCH] D72184: [BPF] support atomic instructions

Yonghong Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Nov 30 19:43:11 PST 2020


yonghong-song updated this revision to Diff 308517.
yonghong-song edited the summary of this revision.
yonghong-song added a comment.

- remove atomic_fetch_sub which can be implemented with neg + atomic_fetch_add
- add support for xand, xor, xxor (xadd already been supported)
- for any given __sync_fetch_and_{add, and, or, xor}, llvm will generate either atomic_fetch_<op> or x<op> depending on whether the return value is used or not.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72184/new/

https://reviews.llvm.org/D72184

Files:
  clang/lib/Basic/Targets/BPF.cpp
  clang/test/Misc/target-invalid-cpu-note.c
  llvm/lib/Target/BPF/BPF.td
  llvm/lib/Target/BPF/BPFInstrFormats.td
  llvm/lib/Target/BPF/BPFInstrInfo.td
  llvm/lib/Target/BPF/BPFMIChecking.cpp
  llvm/lib/Target/BPF/BPFSubtarget.cpp
  llvm/lib/Target/BPF/BPFSubtarget.h
  llvm/lib/Target/BPF/Disassembler/BPFDisassembler.cpp
  llvm/lib/Target/BPF/MCTargetDesc/BPFMCCodeEmitter.cpp
  llvm/test/CodeGen/BPF/atomics.ll
  llvm/test/CodeGen/BPF/atomics_2.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72184.308517.patch
Type: text/x-patch
Size: 27126 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201201/245db9ff/attachment-0001.bin>


More information about the cfe-commits mailing list