diff options
| author | Dan Gohman <gohman@apple.com> | 2010-04-14 16:32:56 +0000 |
|---|---|---|
| committer | Dan Gohman <gohman@apple.com> | 2010-04-14 16:32:56 +0000 |
| commit | ea01bf65af49643fd74b20beacf9bbaaec7afb0f (patch) | |
| tree | 2eb7bc720eabce16d7851a597cf7e9101115be81 /lib/CodeGen | |
| parent | 732b510ba3d3ca77cc6d958b3f17acee94aa2c62 (diff) | |
| download | external_llvm-ea01bf65af49643fd74b20beacf9bbaaec7afb0f.zip external_llvm-ea01bf65af49643fd74b20beacf9bbaaec7afb0f.tar.gz external_llvm-ea01bf65af49643fd74b20beacf9bbaaec7afb0f.tar.bz2 | |
Sink landing-pad marking code out of
SelectionDAGISel::runOnMachineFunction into FunctionLowering.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101252 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
| -rw-r--r-- | lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp | 5 | ||||
| -rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 5 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp b/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp index 04c27e7..d7ed46a 100644 --- a/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp +++ b/lib/CodeGen/SelectionDAG/FunctionLoweringInfo.cpp @@ -232,6 +232,11 @@ void FunctionLoweringInfo::set(Function &fn, MachineFunction &mf, } } } + + // Mark landing pad blocks. + for (BB = Fn->begin(); BB != EB; ++BB) + if (InvokeInst *Invoke = dyn_cast<InvokeInst>(BB->getTerminator())) + MBBMap[Invoke->getSuccessor(1)]->setIsLandingPad(); } /// clear - Clear out all the function-specific state. This returns this diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index c7cc695..6067b1f 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -332,11 +332,6 @@ bool SelectionDAGISel::runOnMachineFunction(MachineFunction &mf) { FuncInfo->set(Fn, *MF, EnableFastISel); SDB->init(GFI, *AA); - for (Function::iterator I = Fn.begin(), E = Fn.end(); I != E; ++I) - if (InvokeInst *Invoke = dyn_cast<InvokeInst>(I->getTerminator())) - // Mark landing pad. - FuncInfo->MBBMap[Invoke->getSuccessor(1)]->setIsLandingPad(); - SelectAllBasicBlocks(Fn, *MF, TII); // If the first basic block in the function has live ins that need to be |
