mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-10 18:34:09 +00:00
Remove propagateEHRegister in favour of a more limited
fix, that is adequate while PR1508 remains unresolved. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37938 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b4fd45e2fc
commit
902919541f
@ -2548,25 +2548,6 @@ static void addCatchInfo(CallInst &I, MachineModuleInfo *MMI,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// propagateEHRegister - The specified EH register is required in a successor
|
|
||||||
/// of the EH landing pad. Propagate it (by adding it to livein) to all the
|
|
||||||
/// blocks in the paths between the landing pad and the specified block.
|
|
||||||
static void propagateEHRegister(MachineBasicBlock *MBB, unsigned EHReg,
|
|
||||||
SmallPtrSet<MachineBasicBlock*, 8> Visited) {
|
|
||||||
if (MBB->isLandingPad() || !Visited.insert(MBB))
|
|
||||||
return;
|
|
||||||
|
|
||||||
MBB->addLiveIn(EHReg);
|
|
||||||
for (MachineBasicBlock::pred_iterator PI = MBB->pred_begin(),
|
|
||||||
E = MBB->pred_end(); PI != E; ++PI)
|
|
||||||
propagateEHRegister(*PI, EHReg, Visited);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void propagateEHRegister(MachineBasicBlock *MBB, unsigned EHReg) {
|
|
||||||
SmallPtrSet<MachineBasicBlock*, 8> Visited;
|
|
||||||
propagateEHRegister(MBB, EHReg, Visited);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// visitIntrinsicCall - Lower the call to the specified intrinsic function. If
|
/// visitIntrinsicCall - Lower the call to the specified intrinsic function. If
|
||||||
/// we want to emit this as a call to a named external function, return the name
|
/// we want to emit this as a call to a named external function, return the name
|
||||||
/// otherwise lower it and return null.
|
/// otherwise lower it and return null.
|
||||||
@ -2677,9 +2658,11 @@ SelectionDAGLowering::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) {
|
|||||||
|
|
||||||
case Intrinsic::eh_exception: {
|
case Intrinsic::eh_exception: {
|
||||||
if (ExceptionHandling) {
|
if (ExceptionHandling) {
|
||||||
if (!CurMBB->isLandingPad() && TLI.getExceptionAddressRegister())
|
if (!CurMBB->isLandingPad()) {
|
||||||
propagateEHRegister(CurMBB, TLI.getExceptionAddressRegister());
|
// FIXME: Mark exception register as live in. Hack for PR1508.
|
||||||
|
unsigned Reg = TLI.getExceptionAddressRegister();
|
||||||
|
if (Reg) CurMBB->addLiveIn(Reg);
|
||||||
|
}
|
||||||
// Insert the EXCEPTIONADDR instruction.
|
// Insert the EXCEPTIONADDR instruction.
|
||||||
SDVTList VTs = DAG.getVTList(TLI.getPointerTy(), MVT::Other);
|
SDVTList VTs = DAG.getVTList(TLI.getPointerTy(), MVT::Other);
|
||||||
SDOperand Ops[1];
|
SDOperand Ops[1];
|
||||||
@ -2703,8 +2686,9 @@ SelectionDAGLowering::visitIntrinsicCall(CallInst &I, unsigned Intrinsic) {
|
|||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
FuncInfo.CatchInfoLost.insert(&I);
|
FuncInfo.CatchInfoLost.insert(&I);
|
||||||
#endif
|
#endif
|
||||||
if (TLI.getExceptionSelectorRegister())
|
// FIXME: Mark exception selector register as live in. Hack for PR1508.
|
||||||
propagateEHRegister(CurMBB, TLI.getExceptionSelectorRegister());
|
unsigned Reg = TLI.getExceptionSelectorRegister();
|
||||||
|
if (Reg) CurMBB->addLiveIn(Reg);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Insert the EHSELECTION instruction.
|
// Insert the EHSELECTION instruction.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user