[PATCH] [Power] Use AtomicExpandPass for fence insertion, and use lwsync where appropriate

Robin Morisset morisset at google.com
Wed Sep 3 16:23:37 PDT 2014


Hi jfb,

This patch makes use of AtomicExpandPass in Power for inserting fences around
atomic as part of an effort to remove fence insertion from SelectionDAGBuilder.
As a big bonus, it lets us use sync 1 (lightweight sync, often used by the mnemonic
lwsync) instead of sync 0 (heavyweight sync) in many cases.

I also added a test, as there was no test for the barriers emitted by the Power
backend for atomic loads and stores.

http://reviews.llvm.org/D5180

Files:
  include/llvm/IR/IntrinsicsPowerPC.td
  lib/Target/PowerPC/PPCISelLowering.cpp
  lib/Target/PowerPC/PPCISelLowering.h
  lib/Target/PowerPC/PPCInstrInfo.td
  lib/Target/PowerPC/PPCTargetMachine.cpp
  test/CodeGen/PowerPC/atomics.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D5180.13234.patch
Type: text/x-patch
Size: 8816 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140903/73be179c/attachment.bin>


More information about the llvm-commits mailing list