[PATCH] D72184: [BPF] support atomic instructions

Yonghong Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 18 11:36:16 PST 2020


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

add support for a barrier function. The correspond C code is __sync_synchronize().
If we want to have variant like barrier for read/write/rw, etc. we may need to define bpf specific barrier functions as __sync_synchronize() does not allow taking additional parameters. I tentatively use one particular encoding but we can certainly change that later.


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/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.306172.patch
Type: text/x-patch
Size: 24019 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20201118/18faa4f6/attachment-0001.bin>


More information about the cfe-commits mailing list