diff options
| author | David Majnemer <david.majnemer@gmail.com> | 2016-01-06 19:26:30 +0000 | 
|---|---|---|
| committer | David Majnemer <david.majnemer@gmail.com> | 2016-01-06 19:26:30 +0000 | 
| commit | eea7582bfa3b30393af643fab1e30008a930e319 (patch) | |
| tree | 0e80c692230c7036527168c6daaad240d5f79ce9 /llvm/lib/CodeGen/WinEHPrepare.cpp | |
| parent | cddcd7256c86a4ea787233745cd69d3809d3b7a3 (diff) | |
| download | bcm5719-llvm-eea7582bfa3b30393af643fab1e30008a930e319.tar.gz bcm5719-llvm-eea7582bfa3b30393af643fab1e30008a930e319.zip  | |
[WinEH] Remove calculateCatchReturnSuccessorColors
The functionality that calculateCatchReturnSuccessorColors provides was
once non-trivial: it was a computation layered on top of funclet
coloring.
These days, LLVM IR directly encodes what
calculateCatchReturnSuccessorColors computed, obsoleting the need for
it.
No functionality change is intended.
llvm-svn: 256965
Diffstat (limited to 'llvm/lib/CodeGen/WinEHPrepare.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/WinEHPrepare.cpp | 18 | 
1 files changed, 0 insertions, 18 deletions
diff --git a/llvm/lib/CodeGen/WinEHPrepare.cpp b/llvm/lib/CodeGen/WinEHPrepare.cpp index 2426c27d43d..f112b1bb3b9 100644 --- a/llvm/lib/CodeGen/WinEHPrepare.cpp +++ b/llvm/lib/CodeGen/WinEHPrepare.cpp @@ -664,24 +664,6 @@ void WinEHPrepare::colorFunclets(Function &F) {    }  } -void llvm::calculateCatchReturnSuccessorColors(const Function *Fn, -                                               WinEHFuncInfo &FuncInfo) { -  for (const BasicBlock &BB : *Fn) { -    const auto *CatchRet = dyn_cast<CatchReturnInst>(BB.getTerminator()); -    if (!CatchRet) -      continue; -    // A 'catchret' returns to the outer scope's color. -    Value *ParentPad = CatchRet->getParentPad(); -    const BasicBlock *Color; -    if (isa<ConstantTokenNone>(ParentPad)) -      Color = &Fn->getEntryBlock(); -    else -      Color = cast<Instruction>(ParentPad)->getParent(); -    // Record the catchret successor's funclet membership. -    FuncInfo.CatchRetSuccessorColorMap[CatchRet] = Color; -  } -} -  void WinEHPrepare::demotePHIsOnFunclets(Function &F) {    // Strip PHI nodes off of EH pads.    SmallVector<PHINode *, 16> PHINodes;  | 

