mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-12-08 12:23:39 +00:00
Add a new subtarget hook for whether or not we'd like to enable
the atomic load linked expander pass to run for a particular subtarget. This requires a check of the subtarget and so save the TargetMachine rather than only TargetLoweringInfo and update all callers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211314 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -171,16 +171,15 @@ TargetPassConfig *ARMBaseTargetMachine::createPassConfig(PassManagerBase &PM) {
|
||||
}
|
||||
|
||||
void ARMPassConfig::addIRPasses() {
|
||||
const ARMSubtarget *Subtarget = &getARMSubtarget();
|
||||
if (Subtarget->hasAnyDataBarrier() && !Subtarget->isThumb1Only()) {
|
||||
addPass(createAtomicExpandLoadLinkedPass(TM));
|
||||
addPass(createAtomicExpandLoadLinkedPass(TM));
|
||||
|
||||
// Cmpxchg instructions are often used with a subsequent comparison to
|
||||
// determine whether it succeeded. We can exploit existing control-flow in
|
||||
// ldrex/strex loops to simplify this, but it needs tidying up.
|
||||
// Cmpxchg instructions are often used with a subsequent comparison to
|
||||
// determine whether it succeeded. We can exploit existing control-flow in
|
||||
// ldrex/strex loops to simplify this, but it needs tidying up.
|
||||
const ARMSubtarget *Subtarget = &getARMSubtarget();
|
||||
if (Subtarget->hasAnyDataBarrier() && !Subtarget->isThumb1Only())
|
||||
if (TM->getOptLevel() != CodeGenOpt::None && EnableAtomicTidy)
|
||||
addPass(createCFGSimplificationPass());
|
||||
}
|
||||
|
||||
TargetPassConfig::addIRPasses();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user