[CodeGen] Refactor TLI/AtomicExpand interface to make LLSC explicit.

Description

[CodeGen] Refactor TLI/AtomicExpand interface to make LLSC explicit.

We used to have this magic "hasLoadLinkedStoreConditional()" callback,
which really meant two things:

  • expand cmpxchg (to ll/sc).
  • expand atomic loads using ll/sc (rather than cmpxchg).

Remove it, and, instead, introduce explicit callbacks:

  • bool shouldExpandAtomicCmpXchgInIR(inst)
  • AtomicExpansionKind shouldExpandAtomicLoadInIR(inst)

Differential Revision: http://reviews.llvm.org/D12557