mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-05 14:34:55 +00:00
Small refactoring. Cache the FunctionInfo->MBB into a local variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141221 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b4a0221e85
commit
6f500541ea
@ -685,21 +685,23 @@ void SelectionDAGISel::DoInstructionSelection() {
|
|||||||
/// PrepareEHLandingPad - Emit an EH_LABEL, set up live-in registers, and
|
/// PrepareEHLandingPad - Emit an EH_LABEL, set up live-in registers, and
|
||||||
/// do other setup for EH landing-pad blocks.
|
/// do other setup for EH landing-pad blocks.
|
||||||
void SelectionDAGISel::PrepareEHLandingPad() {
|
void SelectionDAGISel::PrepareEHLandingPad() {
|
||||||
|
MachineBasicBlock *MBB = FuncInfo->MBB;
|
||||||
|
|
||||||
// Add a label to mark the beginning of the landing pad. Deletion of the
|
// Add a label to mark the beginning of the landing pad. Deletion of the
|
||||||
// landing pad can thus be detected via the MachineModuleInfo.
|
// landing pad can thus be detected via the MachineModuleInfo.
|
||||||
MCSymbol *Label = MF->getMMI().addLandingPad(FuncInfo->MBB);
|
MCSymbol *Label = MF->getMMI().addLandingPad(MBB);
|
||||||
|
|
||||||
const MCInstrDesc &II = TM.getInstrInfo()->get(TargetOpcode::EH_LABEL);
|
const MCInstrDesc &II = TM.getInstrInfo()->get(TargetOpcode::EH_LABEL);
|
||||||
BuildMI(*FuncInfo->MBB, FuncInfo->InsertPt, SDB->getCurDebugLoc(), II)
|
BuildMI(*MBB, FuncInfo->InsertPt, SDB->getCurDebugLoc(), II)
|
||||||
.addSym(Label);
|
.addSym(Label);
|
||||||
|
|
||||||
// Mark exception register as live in.
|
// Mark exception register as live in.
|
||||||
unsigned Reg = TLI.getExceptionAddressRegister();
|
unsigned Reg = TLI.getExceptionAddressRegister();
|
||||||
if (Reg) FuncInfo->MBB->addLiveIn(Reg);
|
if (Reg) MBB->addLiveIn(Reg);
|
||||||
|
|
||||||
// Mark exception selector register as live in.
|
// Mark exception selector register as live in.
|
||||||
Reg = TLI.getExceptionSelectorRegister();
|
Reg = TLI.getExceptionSelectorRegister();
|
||||||
if (Reg) FuncInfo->MBB->addLiveIn(Reg);
|
if (Reg) MBB->addLiveIn(Reg);
|
||||||
|
|
||||||
// FIXME: Hack around an exception handling flaw (PR1508): the personality
|
// FIXME: Hack around an exception handling flaw (PR1508): the personality
|
||||||
// function and list of typeids logically belong to the invoke (or, if you
|
// function and list of typeids logically belong to the invoke (or, if you
|
||||||
@ -712,7 +714,7 @@ void SelectionDAGISel::PrepareEHLandingPad() {
|
|||||||
// in exceptions not being caught because no typeids are associated with
|
// in exceptions not being caught because no typeids are associated with
|
||||||
// the invoke. This may not be the only way things can go wrong, but it
|
// the invoke. This may not be the only way things can go wrong, but it
|
||||||
// is the only way we try to work around for the moment.
|
// is the only way we try to work around for the moment.
|
||||||
const BasicBlock *LLVMBB = FuncInfo->MBB->getBasicBlock();
|
const BasicBlock *LLVMBB = MBB->getBasicBlock();
|
||||||
const BranchInst *Br = dyn_cast<BranchInst>(LLVMBB->getTerminator());
|
const BranchInst *Br = dyn_cast<BranchInst>(LLVMBB->getTerminator());
|
||||||
|
|
||||||
if (Br && Br->isUnconditional()) { // Critical edge?
|
if (Br && Br->isUnconditional()) { // Critical edge?
|
||||||
@ -727,8 +729,6 @@ void SelectionDAGISel::PrepareEHLandingPad() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/// TryToFoldFastISelLoad - We're checking to see if we can fold the specified
|
/// TryToFoldFastISelLoad - We're checking to see if we can fold the specified
|
||||||
/// load into the specified FoldInst. Note that we could have a sequence where
|
/// load into the specified FoldInst. Note that we could have a sequence where
|
||||||
/// multiple LLVM IR instructions are folded into the same machineinstr. For
|
/// multiple LLVM IR instructions are folded into the same machineinstr. For
|
||||||
|
Loading…
x
Reference in New Issue
Block a user