mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-25 05:22:04 +00:00
Add a thread-model knob for lowering atomics on baremetal & single threaded systems
http://reviews.llvm.org/D4984 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216182 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -158,7 +158,10 @@ TargetPassConfig *ARMBaseTargetMachine::createPassConfig(PassManagerBase &PM) {
|
||||
}
|
||||
|
||||
void ARMPassConfig::addIRPasses() {
|
||||
addPass(createAtomicExpandLoadLinkedPass(TM));
|
||||
if (TM->Options.ThreadModel == ThreadModel::Single)
|
||||
addPass(createLowerAtomicPass());
|
||||
else
|
||||
addPass(createAtomicExpandLoadLinkedPass(TM));
|
||||
|
||||
// Cmpxchg instructions are often used with a subsequent comparison to
|
||||
// determine whether it succeeded. We can exploit existing control-flow in
|
||||
|
||||
Reference in New Issue
Block a user