mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-24 22:24:54 +00:00
[X86] Use the generic AtomicExpandPass instead of X86AtomicExpandPass
This required a new hook called hasLoadLinkedStoreConditional to know whether to expand atomics to LL/SC (ARM, AArch64, in a future patch Power) or to CmpXchg (X86). Apart from that, the new code in AtomicExpandPass is mostly moved from X86AtomicExpandPass. The main result of this patch is to get rid of that pass, which had lots of code duplicated with AtomicExpandPass. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217928 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -936,6 +936,10 @@ public:
|
||||
/// \name Helpers for atomic expansion.
|
||||
/// @{
|
||||
|
||||
/// True if AtomicExpandPass should use emitLoadLinked/emitStoreConditional
|
||||
/// and expand AtomicCmpXchgInst.
|
||||
virtual bool hasLoadLinkedStoreConditional() const { return false; }
|
||||
|
||||
/// Perform a load-linked operation on Addr, returning a "Value *" with the
|
||||
/// corresponding pointee type. This may entail some non-trivial operations to
|
||||
/// truncate or reconstruct types that will be illegal in the backend. See
|
||||
|
Reference in New Issue
Block a user