summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Christopher <echristo@gmail.com>2015-01-27 01:04:42 +0000
committerEric Christopher <echristo@gmail.com>2015-01-27 01:04:42 +0000
commit4e048eeb2a780df9718dec6dedf8fd9b54c6174b (patch)
treec54b7324faa946c16338bc5b5dc309a3fff3e733
parent7aebb32dd303aeba3d9b2560e5725eaf8e5a730b (diff)
downloadbcm5719-llvm-4e048eeb2a780df9718dec6dedf8fd9b54c6174b.tar.gz
bcm5719-llvm-4e048eeb2a780df9718dec6dedf8fd9b54c6174b.zip
Migrate AtomicExpandPass and DwarfEHPrepare to using a Function-ized getSubtargetImpl.
llvm-svn: 227159
-rw-r--r--llvm/lib/CodeGen/AtomicExpandPass.cpp4
-rw-r--r--llvm/lib/CodeGen/DwarfEHPrepare.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/AtomicExpandPass.cpp b/llvm/lib/CodeGen/AtomicExpandPass.cpp
index be4e6c24a8c..4b64be053df 100644
--- a/llvm/lib/CodeGen/AtomicExpandPass.cpp
+++ b/llvm/lib/CodeGen/AtomicExpandPass.cpp
@@ -68,9 +68,9 @@ FunctionPass *llvm::createAtomicExpandPass(const TargetMachine *TM) {
}
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;
diff --git a/llvm/lib/CodeGen/DwarfEHPrepare.cpp b/llvm/lib/CodeGen/DwarfEHPrepare.cpp
index 75b74d9a6c3..70664207587 100644
--- a/llvm/lib/CodeGen/DwarfEHPrepare.cpp
+++ b/llvm/lib/CodeGen/DwarfEHPrepare.cpp
@@ -124,7 +124,7 @@ bool DwarfEHPrepare::InsertUnwindResumeCalls(Function &Fn) {
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),
OpenPOWER on IntegriCloud