diff options
author | Chris Lattner <sabre@nondot.org> | 2004-02-08 21:44:31 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-02-08 21:44:31 +0000 |
commit | aeb2a1d70807aa626f335fb23d47bc604ffeaa15 (patch) | |
tree | ef4d4e8c8794fb6ddfb4148f6d5ebe91987bf72a /lib | |
parent | 95778a02572d2d5e0e4bea6ef2ec95b2964c05be (diff) | |
download | external_llvm-aeb2a1d70807aa626f335fb23d47bc604ffeaa15.zip external_llvm-aeb2a1d70807aa626f335fb23d47bc604ffeaa15.tar.gz external_llvm-aeb2a1d70807aa626f335fb23d47bc604ffeaa15.tar.bz2 |
rename the "exceptional" destination of an invoke instruction to the 'unwind' dest
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@11202 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ExecutionEngine/Interpreter/Execution.cpp | 3 | ||||
-rw-r--r-- | lib/Target/CBackend/CBackend.cpp | 2 | ||||
-rw-r--r-- | lib/Target/CBackend/Writer.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/IPO/DeadArgumentElimination.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/IPO/LowerSetJmp.cpp | 4 | ||||
-rw-r--r-- | lib/Transforms/IPO/PruneEH.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/Scalar/InstructionCombining.cpp | 4 | ||||
-rw-r--r-- | lib/Transforms/Utils/InlineFunction.cpp | 2 | ||||
-rw-r--r-- | lib/Transforms/Utils/LowerInvoke.cpp | 4 | ||||
-rw-r--r-- | lib/Transforms/Utils/SimplifyCFG.cpp | 2 | ||||
-rw-r--r-- | lib/VMCore/AsmWriter.cpp | 2 |
11 files changed, 14 insertions, 15 deletions
diff --git a/lib/ExecutionEngine/Interpreter/Execution.cpp b/lib/ExecutionEngine/Interpreter/Execution.cpp index 22812c3..57ae621 100644 --- a/lib/ExecutionEngine/Interpreter/Execution.cpp +++ b/lib/ExecutionEngine/Interpreter/Execution.cpp @@ -589,8 +589,7 @@ void Interpreter::visitUnwindInst(UnwindInst &I) { InvokingSF.Caller = CallSite (); // Go to exceptional destination BB of invoke instruction - SwitchToNewBasicBlock (cast<InvokeInst> (Inst)->getExceptionalDest (), - InvokingSF); + SwitchToNewBasicBlock(cast<InvokeInst>(Inst)->getUnwindDest(), InvokingSF); } void Interpreter::visitBranchInst(BranchInst &I) { diff --git a/lib/Target/CBackend/CBackend.cpp b/lib/Target/CBackend/CBackend.cpp index 3d73493..7e1c84f 100644 --- a/lib/Target/CBackend/CBackend.cpp +++ b/lib/Target/CBackend/CBackend.cpp @@ -1092,7 +1092,7 @@ void CWriter::visitInvokeInst(InvokeInst &II) { << " Entry.next = __llvm_jmpbuf_list;\n" << " if (setjmp(Entry.buf)) {\n" << " __llvm_jmpbuf_list = Entry.next;\n"; - printBranchToBlock(II.getParent(), II.getExceptionalDest(), 4); + printBranchToBlock(II.getParent(), II.getUnwindDest(), 4); Out << " }\n" << " __llvm_jmpbuf_list = &Entry;\n" << " "; diff --git a/lib/Target/CBackend/Writer.cpp b/lib/Target/CBackend/Writer.cpp index 3d73493..7e1c84f 100644 --- a/lib/Target/CBackend/Writer.cpp +++ b/lib/Target/CBackend/Writer.cpp @@ -1092,7 +1092,7 @@ void CWriter::visitInvokeInst(InvokeInst &II) { << " Entry.next = __llvm_jmpbuf_list;\n" << " if (setjmp(Entry.buf)) {\n" << " __llvm_jmpbuf_list = Entry.next;\n"; - printBranchToBlock(II.getParent(), II.getExceptionalDest(), 4); + printBranchToBlock(II.getParent(), II.getUnwindDest(), 4); Out << " }\n" << " __llvm_jmpbuf_list = &Entry;\n" << " "; diff --git a/lib/Transforms/IPO/DeadArgumentElimination.cpp b/lib/Transforms/IPO/DeadArgumentElimination.cpp index 2775761..19b61907 100644 --- a/lib/Transforms/IPO/DeadArgumentElimination.cpp +++ b/lib/Transforms/IPO/DeadArgumentElimination.cpp @@ -424,7 +424,7 @@ void DAE::RemoveDeadArgumentsFromFunction(Function *F) { Instruction *New; if (InvokeInst *II = dyn_cast<InvokeInst>(Call)) { - New = new InvokeInst(NF, II->getNormalDest(), II->getExceptionalDest(), + New = new InvokeInst(NF, II->getNormalDest(), II->getUnwindDest(), Args, "", Call); } else { New = new CallInst(NF, Args, "", Call); diff --git a/lib/Transforms/IPO/LowerSetJmp.cpp b/lib/Transforms/IPO/LowerSetJmp.cpp index a2146f4..f79ab0d 100644 --- a/lib/Transforms/IPO/LowerSetJmp.cpp +++ b/lib/Transforms/IPO/LowerSetJmp.cpp @@ -489,7 +489,7 @@ void LowerSetJmp::visitInvokeInst(InvokeInst& II) if (!DFSBlocks.count(BB)) return; BasicBlock* NormalBB = II.getNormalDest(); - BasicBlock* ExceptBB = II.getExceptionalDest(); + BasicBlock* ExceptBB = II.getUnwindDest(); Function* Func = BB->getParent(); BasicBlock* NewExceptBB = new BasicBlock("InvokeExcept", Func); @@ -503,7 +503,7 @@ void LowerSetJmp::visitInvokeInst(InvokeInst& II) new BranchInst(PrelimBBMap[Func], ExceptBB, IsLJExcept, NewExceptBB); - II.setExceptionalDest(NewExceptBB); + II.setUnwindDest(NewExceptBB); ++InvokesTransformed; } diff --git a/lib/Transforms/IPO/PruneEH.cpp b/lib/Transforms/IPO/PruneEH.cpp index 7c0a73e..7c4fc22 100644 --- a/lib/Transforms/IPO/PruneEH.cpp +++ b/lib/Transforms/IPO/PruneEH.cpp @@ -113,7 +113,7 @@ bool PruneEH::runOnSCC(const std::vector<CallGraphNode *> &SCC) { // Anything that used the value produced by the invoke instruction // now uses the value produced by the call instruction. II->replaceAllUsesWith(Call); - II->getExceptionalDest()->removePredecessor(II->getParent()); + II->getUnwindDest()->removePredecessor(II->getParent()); // Insert a branch to the normal destination right before the // invoke. diff --git a/lib/Transforms/Scalar/InstructionCombining.cpp b/lib/Transforms/Scalar/InstructionCombining.cpp index 8a08955..85d580b 100644 --- a/lib/Transforms/Scalar/InstructionCombining.cpp +++ b/lib/Transforms/Scalar/InstructionCombining.cpp @@ -1839,7 +1839,7 @@ bool InstCombiner::transformConstExprCastCall(CallSite CS) { UI != E; ++UI) if (PHINode *PN = dyn_cast<PHINode>(*UI)) if (PN->getParent() == II->getNormalDest() || - PN->getParent() == II->getExceptionalDest()) + PN->getParent() == II->getUnwindDest()) return false; } @@ -1904,7 +1904,7 @@ bool InstCombiner::transformConstExprCastCall(CallSite CS) { Instruction *NC; if (InvokeInst *II = dyn_cast<InvokeInst>(Caller)) { - NC = new InvokeInst(Callee, II->getNormalDest(), II->getExceptionalDest(), + NC = new InvokeInst(Callee, II->getNormalDest(), II->getUnwindDest(), Args, Caller->getName(), Caller); } else { NC = new CallInst(Callee, Args, Caller->getName(), Caller); diff --git a/lib/Transforms/Utils/InlineFunction.cpp b/lib/Transforms/Utils/InlineFunction.cpp index 8edf9d0..3c88659 100644 --- a/lib/Transforms/Utils/InlineFunction.cpp +++ b/lib/Transforms/Utils/InlineFunction.cpp @@ -106,7 +106,7 @@ bool llvm::InlineFunction(CallSite CS) { // any inlined 'unwind' instructions into branches to the invoke exception // destination, and call instructions into invoke instructions. if (InvokeInst *II = dyn_cast<InvokeInst>(TheCall)) { - BasicBlock *InvokeDest = II->getExceptionalDest(); + BasicBlock *InvokeDest = II->getUnwindDest(); std::vector<Value*> InvokeDestPHIValues; // If there are PHI nodes in the exceptional destination block, we need to diff --git a/lib/Transforms/Utils/LowerInvoke.cpp b/lib/Transforms/Utils/LowerInvoke.cpp index bd9c8bc..8329465 100644 --- a/lib/Transforms/Utils/LowerInvoke.cpp +++ b/lib/Transforms/Utils/LowerInvoke.cpp @@ -169,7 +169,7 @@ bool LowerInvoke::insertCheapEHSupport(Function &F) { new BranchInst(II->getNormalDest(), II); // Remove any PHI node entries from the exception destination. - II->getExceptionalDest()->removePredecessor(BB); + II->getUnwindDest()->removePredecessor(BB); // Remove the invoke instruction now. BB->getInstList().erase(II); @@ -256,7 +256,7 @@ bool LowerInvoke::insertExpensiveEHSupport(Function &F) { new StoreInst(OldEntry, JBListHead, InsertLoc); // Now we change the invoke into a branch instruction. - new BranchInst(II->getNormalDest(), II->getExceptionalDest(), IsNormal, II); + new BranchInst(II->getNormalDest(), II->getUnwindDest(), IsNormal, II); // Remove the InvokeInst now. BB->getInstList().erase(II); diff --git a/lib/Transforms/Utils/SimplifyCFG.cpp b/lib/Transforms/Utils/SimplifyCFG.cpp index b827123..8aec92a 100644 --- a/lib/Transforms/Utils/SimplifyCFG.cpp +++ b/lib/Transforms/Utils/SimplifyCFG.cpp @@ -115,7 +115,7 @@ bool llvm::SimplifyCFG(BasicBlock *BB) { while (!Preds.empty()) { BasicBlock *Pred = Preds.back(); if (InvokeInst *II = dyn_cast<InvokeInst>(Pred->getTerminator())) - if (II->getExceptionalDest() == BB) { + if (II->getUnwindDest() == BB) { // Insert a new branch instruction before the invoke, because this // is now a fall through... BranchInst *BI = new BranchInst(II->getNormalDest(), II); diff --git a/lib/VMCore/AsmWriter.cpp b/lib/VMCore/AsmWriter.cpp index 2a87aef..e7928e2 100644 --- a/lib/VMCore/AsmWriter.cpp +++ b/lib/VMCore/AsmWriter.cpp @@ -895,7 +895,7 @@ void AssemblyWriter::printInstruction(const Instruction &I) { Out << " )\n\t\t\tto"; writeOperand(II->getNormalDest(), true); Out << " except"; - writeOperand(II->getExceptionalDest(), true); + writeOperand(II->getUnwindDest(), true); } else if (const AllocationInst *AI = dyn_cast<AllocationInst>(&I)) { Out << " "; |