mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-15 06:29:05 +00:00
Migrate AtomicExpandPass and DwarfEHPrepare to using a Function-ized getSubtargetImpl.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227159 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -68,9 +68,9 @@ FunctionPass *llvm::createAtomicExpandPass(const TargetMachine *TM) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool AtomicExpand::runOnFunction(Function &F) {
|
bool AtomicExpand::runOnFunction(Function &F) {
|
||||||
if (!TM || !TM->getSubtargetImpl()->enableAtomicExpand())
|
if (!TM || !TM->getSubtargetImpl(F)->enableAtomicExpand())
|
||||||
return false;
|
return false;
|
||||||
TLI = TM->getSubtargetImpl()->getTargetLowering();
|
TLI = TM->getSubtargetImpl(F)->getTargetLowering();
|
||||||
|
|
||||||
SmallVector<Instruction *, 1> AtomicInsts;
|
SmallVector<Instruction *, 1> AtomicInsts;
|
||||||
|
|
||||||
|
@@ -124,7 +124,7 @@ bool DwarfEHPrepare::InsertUnwindResumeCalls(Function &Fn) {
|
|||||||
return false;
|
return false;
|
||||||
|
|
||||||
// Find the rewind function if we didn't already.
|
// Find the rewind function if we didn't already.
|
||||||
const TargetLowering *TLI = TM->getSubtargetImpl()->getTargetLowering();
|
const TargetLowering *TLI = TM->getSubtargetImpl(Fn)->getTargetLowering();
|
||||||
if (!RewindFunction) {
|
if (!RewindFunction) {
|
||||||
LLVMContext &Ctx = Resumes[0]->getContext();
|
LLVMContext &Ctx = Resumes[0]->getContext();
|
||||||
FunctionType *FTy = FunctionType::get(Type::getVoidTy(Ctx),
|
FunctionType *FTy = FunctionType::get(Type::getVoidTy(Ctx),
|
||||||
|
Reference in New Issue
Block a user