summaryrefslogtreecommitdiff
path: root/lib/Transforms
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/IPO/DeadArgumentElimination.cpp2
-rw-r--r--lib/Transforms/Scalar/LowerGC.cpp2
-rw-r--r--lib/Transforms/Scalar/SimplifyCFG.cpp2
-rw-r--r--lib/Transforms/Utils/InlineFunction.cpp8
4 files changed, 6 insertions, 8 deletions
diff --git a/lib/Transforms/IPO/DeadArgumentElimination.cpp b/lib/Transforms/IPO/DeadArgumentElimination.cpp
index a76a43a20b..446b9652e1 100644
--- a/lib/Transforms/IPO/DeadArgumentElimination.cpp
+++ b/lib/Transforms/IPO/DeadArgumentElimination.cpp
@@ -284,7 +284,7 @@ void DAE::SurveyFunction(Function &F) {
Liveness RetValLiveness = F.getReturnType() == Type::VoidTy ? Live : Dead;
if (!F.hasInternalLinkage() &&
- (!ShouldHackArguments() || F.getIntrinsicID()))
+ (!ShouldHackArguments() || F.isIntrinsic()))
FunctionIntrinsicallyLive = true;
else
for (Value::use_iterator I = F.use_begin(), E = F.use_end(); I != E; ++I) {
diff --git a/lib/Transforms/Scalar/LowerGC.cpp b/lib/Transforms/Scalar/LowerGC.cpp
index aff3f2cb30..9935a84cda 100644
--- a/lib/Transforms/Scalar/LowerGC.cpp
+++ b/lib/Transforms/Scalar/LowerGC.cpp
@@ -177,7 +177,7 @@ bool LowerGC::runOnFunction(Function &F) {
for (BasicBlock::iterator II = BB->begin(), E = BB->end(); II != E;)
if (CallInst *CI = dyn_cast<CallInst>(II++)) {
if (!CI->getCalledFunction() ||
- !CI->getCalledFunction()->getIntrinsicID())
+ !CI->getCalledFunction()->isIntrinsic())
NormalCalls.push_back(CI); // Remember all normal function calls.
if (Function *F = CI->getCalledFunction())
diff --git a/lib/Transforms/Scalar/SimplifyCFG.cpp b/lib/Transforms/Scalar/SimplifyCFG.cpp
index 259f4d1626..eb1ed4e60d 100644
--- a/lib/Transforms/Scalar/SimplifyCFG.cpp
+++ b/lib/Transforms/Scalar/SimplifyCFG.cpp
@@ -135,7 +135,7 @@ static bool MarkAliveBlocks(BasicBlock *BB,
// Turn invokes that call 'nounwind' functions into ordinary calls.
if (InvokeInst *II = dyn_cast<InvokeInst>(BB->getTerminator()))
- if (II->paramHasAttr(0, ParamAttr::NoUnwind)) {
+ if (II->isNoUnwind()) {
ChangeToCall(II);
Changed = true;
}
diff --git a/lib/Transforms/Utils/InlineFunction.cpp b/lib/Transforms/Utils/InlineFunction.cpp
index 2a6d9ae9a2..e9f6b28e98 100644
--- a/lib/Transforms/Utils/InlineFunction.cpp
+++ b/lib/Transforms/Utils/InlineFunction.cpp
@@ -69,13 +69,11 @@ static void HandleInlinedInvoke(InvokeInst *II, BasicBlock *FirstNewBlock,
if (!isa<CallInst>(I)) continue;
CallInst *CI = cast<CallInst>(I);
- // If this is an intrinsic function call or an inline asm, don't
+ // If this call cannot unwind or is an inline asm, don't
// convert it to an invoke.
- if ((CI->getCalledFunction() &&
- CI->getCalledFunction()->getIntrinsicID()) ||
- isa<InlineAsm>(CI->getCalledValue()))
+ if (CI->isNoUnwind() || isa<InlineAsm>(CI->getCalledValue()))
continue;
-
+
// Convert this function call into an invoke instruction.
// First, split the basic block.
BasicBlock *Split = BB->splitBasicBlock(CI, CI->getName()+".noexc");