Tweak some atomics functions in preparation for larger changes; NFC.
authorJames Y Knight <jyknight@google.com>
Wed, 16 Mar 2016 22:12:04 +0000 (22:12 +0000)
committerJames Y Knight <jyknight@google.com>
Wed, 16 Mar 2016 22:12:04 +0000 (22:12 +0000)
commitf44fc5219f9e16f51de8eaa50a93fc6e7afcacba
tree28e01cc65e659c5de43f6426133f57f26fd15222
parentb321050a9360ade08460b4b7eeeafeb95569b937
Tweak some atomics functions in preparation for larger changes; NFC.

- Rename getATOMIC to getSYNC, as llvm will soon be able to emit both
  '__sync' libcalls and '__atomic' libcalls, and this function is for
  the '__sync' ones.

- getInsertFencesForAtomic() has been replaced with
  shouldInsertFencesForAtomic(Instruction), so that the decision can be
  made per-instruction. This functionality will be used soon.

- emitLeadingFence/emitTrailingFence are no longer called if
  shouldInsertFencesForAtomic returns false, and thus don't need to
  check the condition themselves.

llvm-svn: 263665
17 files changed:
llvm/include/llvm/CodeGen/RuntimeLibcalls.h
llvm/include/llvm/Target/TargetLowering.h
llvm/lib/CodeGen/AtomicExpandPass.cpp
llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp
llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
llvm/lib/CodeGen/TargetLoweringBase.cpp
llvm/lib/Target/ARM/ARMISelLowering.cpp
llvm/lib/Target/ARM/ARMISelLowering.h
llvm/lib/Target/Hexagon/HexagonISelLowering.cpp
llvm/lib/Target/Mips/MipsISelLowering.cpp
llvm/lib/Target/Mips/MipsISelLowering.h
llvm/lib/Target/PowerPC/PPCISelLowering.cpp
llvm/lib/Target/PowerPC/PPCISelLowering.h
llvm/lib/Target/Sparc/SparcISelLowering.cpp
llvm/lib/Target/Sparc/SparcISelLowering.h
llvm/lib/Target/XCore/XCoreISelLowering.cpp
llvm/lib/Target/XCore/XCoreISelLowering.h