Changes in directory llvm/lib/CodeGen/SelectionDAG:
SelectionDAGISel.cpp updated: 1.461 -> 1.462 --- Log message: Only correctly lower exception handing intrinsics if exception handling is turned on. Likewise for scanning of invokes to mark landing pads. --- Diffs of the changes: (+7 -8) SelectionDAGISel.cpp | 15 +++++++-------- 1 files changed, 7 insertions(+), 8 deletions(-) Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.461 llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.462 --- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp:1.461 Wed Jun 13 10:12:02 2007 +++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Wed Jun 13 11:53:21 2007 @@ -2574,7 +2574,7 @@ case Intrinsic::eh_exception: { MachineModuleInfo *MMI = DAG.getMachineModuleInfo(); - if (MMI) { + if (ExceptionHandling && MMI) { // Mark exception register as live in. unsigned Reg = TLI.getExceptionAddressRegister(); if (Reg) CurMBB->addLiveIn(Reg); @@ -2596,7 +2596,7 @@ case Intrinsic::eh_filter:{ MachineModuleInfo *MMI = DAG.getMachineModuleInfo(); - if (MMI) { + if (ExceptionHandling && MMI) { // Inform the MachineModuleInfo of the personality for this landing pad. ConstantExpr *CE = dyn_cast<ConstantExpr>(I.getOperand(2)); assert(CE && CE->getOpcode() == Instruction::BitCast && @@ -4386,12 +4386,11 @@ FunctionLoweringInfo FuncInfo(TLI, Fn, MF); - for (Function::iterator I = Fn.begin(), E = Fn.end(); I != E; ++I) - if (InvokeInst *Invoke = dyn_cast<InvokeInst>(I->getTerminator())) { - // Mark landing pad. - MachineBasicBlock *LandingPad = FuncInfo.MBBMap[Invoke->getSuccessor(1)]; - LandingPad->setIsLandingPad(); - } + if (ExceptionHandling) + 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(); for (Function::iterator I = Fn.begin(), E = Fn.end(); I != E; ++I) SelectBasicBlock(I, MF, FuncInfo); _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits