summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/IPO/PruneEH.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2007-12-18 09:59:50 +0000
committerDuncan Sands <baldrick@free.fr>2007-12-18 09:59:50 +0000
commit3353ed09ace5affb4448ea387dc676734ed94e10 (patch)
tree08a6c94a8d9dd23526b51a788d6a0ada0f46ef60 /llvm/lib/Transforms/IPO/PruneEH.cpp
parent30291f4a3014687be84e33fa0bf86fc8b2dfeb39 (diff)
downloadbcm5719-llvm-3353ed09ace5affb4448ea387dc676734ed94e10.tar.gz
bcm5719-llvm-3353ed09ace5affb4448ea387dc676734ed94e10.zip
Rename isNoReturn to doesNotReturn, and isNoUnwind to
doesNotThrow. llvm-svn: 45160
Diffstat (limited to 'llvm/lib/Transforms/IPO/PruneEH.cpp')
-rw-r--r--llvm/lib/Transforms/IPO/PruneEH.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/Transforms/IPO/PruneEH.cpp b/llvm/lib/Transforms/IPO/PruneEH.cpp
index b4bcd995189..69bb1f67c74 100644
--- a/llvm/lib/Transforms/IPO/PruneEH.cpp
+++ b/llvm/lib/Transforms/IPO/PruneEH.cpp
@@ -74,11 +74,11 @@ bool PruneEH::runOnSCC(const std::vector<CallGraphNode *> &SCC) {
SCCMightUnwind = true;
SCCMightReturn = true;
} else if (F->isDeclaration()) {
- SCCMightUnwind |= !F->isNoUnwind();
- SCCMightReturn |= !F->isNoReturn();
+ SCCMightUnwind |= !F->doesNotThrow();
+ SCCMightReturn |= !F->doesNotReturn();
} else {
- bool CheckUnwind = !SCCMightUnwind && !F->isNoUnwind();
- bool CheckReturn = !SCCMightReturn && !F->isNoReturn();
+ bool CheckUnwind = !SCCMightUnwind && !F->doesNotThrow();
+ bool CheckReturn = !SCCMightReturn && !F->doesNotReturn();
if (!CheckUnwind && !CheckReturn)
continue;
@@ -98,7 +98,7 @@ bool PruneEH::runOnSCC(const std::vector<CallGraphNode *> &SCC) {
if (CheckUnwind && !SCCMightUnwind)
for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; ++I)
if (CallInst *CI = dyn_cast<CallInst>(I)) {
- if (CI->isNoUnwind()) {
+ if (CI->doesNotThrow()) {
// This call cannot throw.
} else if (Function *Callee = CI->getCalledFunction()) {
CallGraphNode *CalleeNode = CG[Callee];
@@ -155,7 +155,7 @@ bool PruneEH::SimplifyFunction(Function *F) {
bool MadeChange = false;
for (Function::iterator BB = F->begin(), E = F->end(); BB != E; ++BB) {
if (InvokeInst *II = dyn_cast<InvokeInst>(BB->getTerminator()))
- if (II->isNoUnwind()) {
+ if (II->doesNotThrow()) {
SmallVector<Value*, 8> Args(II->op_begin()+3, II->op_end());
// Insert a call instruction before the invoke.
CallInst *Call = new CallInst(II->getCalledValue(),
@@ -187,7 +187,7 @@ bool PruneEH::SimplifyFunction(Function *F) {
for (BasicBlock::iterator I = BB->begin(), E = BB->end(); I != E; )
if (CallInst *CI = dyn_cast<CallInst>(I++))
- if (CI->isNoReturn() && !isa<UnreachableInst>(I)) {
+ if (CI->doesNotReturn() && !isa<UnreachableInst>(I)) {
// This call calls a function that cannot return. Insert an
// unreachable instruction after it and simplify the code. Do this
// by splitting the BB, adding the unreachable, then deleting the
OpenPOWER on IntegriCloud