[llvm] r227159 - Migrate AtomicExpandPass and DwarfEHPrepare to using a Function-ized getSubtargetImpl.
Eric Christopher
echristo at gmail.com
Mon Jan 26 17:04:42 PST 2015
Author: echristo
Date: Mon Jan 26 19:04:42 2015
New Revision: 227159
URL: http://llvm.org/viewvc/llvm-project?rev=227159&view=rev
Log:
Migrate AtomicExpandPass and DwarfEHPrepare to using a Function-ized getSubtargetImpl.
Modified:
llvm/trunk/lib/CodeGen/AtomicExpandPass.cpp
llvm/trunk/lib/CodeGen/DwarfEHPrepare.cpp
Modified: llvm/trunk/lib/CodeGen/AtomicExpandPass.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AtomicExpandPass.cpp?rev=227159&r1=227158&r2=227159&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AtomicExpandPass.cpp (original)
+++ llvm/trunk/lib/CodeGen/AtomicExpandPass.cpp Mon Jan 26 19:04:42 2015
@@ -68,9 +68,9 @@ FunctionPass *llvm::createAtomicExpandPa
}
bool AtomicExpand::runOnFunction(Function &F) {
- if (!TM || !TM->getSubtargetImpl()->enableAtomicExpand())
+ if (!TM || !TM->getSubtargetImpl(F)->enableAtomicExpand())
return false;
- TLI = TM->getSubtargetImpl()->getTargetLowering();
+ TLI = TM->getSubtargetImpl(F)->getTargetLowering();
SmallVector<Instruction *, 1> AtomicInsts;
Modified: llvm/trunk/lib/CodeGen/DwarfEHPrepare.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/DwarfEHPrepare.cpp?rev=227159&r1=227158&r2=227159&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/DwarfEHPrepare.cpp (original)
+++ llvm/trunk/lib/CodeGen/DwarfEHPrepare.cpp Mon Jan 26 19:04:42 2015
@@ -124,7 +124,7 @@ bool DwarfEHPrepare::InsertUnwindResumeC
return false;
// Find the rewind function if we didn't already.
- const TargetLowering *TLI = TM->getSubtargetImpl()->getTargetLowering();
+ const TargetLowering *TLI = TM->getSubtargetImpl(Fn)->getTargetLowering();
if (!RewindFunction) {
LLVMContext &Ctx = Resumes[0]->getContext();
FunctionType *FTy = FunctionType::get(Type::getVoidTy(Ctx),
More information about the llvm-commits
mailing list