mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-12 13:38:21 +00:00
A machine basic block may end in an unconditional branch, however it may have
more than one successor. Normally, these extra successors are dead. However, some of them may branch to exception handling landing pads. If we remove those successors, then the landing pads could go away if all predecessors to it are removed. Before, it was checking if the direct successor was the landing pad. But it could be the result of jumping through multiple basic blocks to get to it. If we were to only check for the existence of an EH_LABEL in the basic block and not remove successors if it's in there, then it could stop actually dead basic blocks from being removed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91092 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -327,6 +327,11 @@ public:
|
||||
/// 'Old', change the code and CFG so that it branches to 'New' instead.
|
||||
void ReplaceUsesOfBlockWith(MachineBasicBlock *Old, MachineBasicBlock *New);
|
||||
|
||||
/// BranchesToLandingPad - The basic block branches only to a landing pad or
|
||||
/// to another basic block which branches only to a landing pad. No other
|
||||
/// instructions are present other than the unconditional branch.
|
||||
bool BranchesToLandingPad(const MachineBasicBlock *MBB) const;
|
||||
|
||||
/// CorrectExtraCFGEdges - Various pieces of code can cause excess edges in
|
||||
/// the CFG to be inserted. If we have proven that MBB can only branch to
|
||||
/// DestA and DestB, remove any other MBB successors from the CFG. DestA and
|
||||
|
Reference in New Issue
Block a user