summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Utils/InlineFunction.cpp
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2010-05-31 21:00:26 +0000
committerDuncan Sands <baldrick@free.fr>2010-05-31 21:00:26 +0000
commit4c904fa797656465bd1c9d74e7780558939990c7 (patch)
tree09d6f953cc32c455b6a1d6eed15222aab5597b7a /llvm/lib/Transforms/Utils/InlineFunction.cpp
parent5d3c11337a62d7e6834c4bdeacbc5266506dde95 (diff)
downloadbcm5719-llvm-4c904fa797656465bd1c9d74e7780558939990c7.tar.gz
bcm5719-llvm-4c904fa797656465bd1c9d74e7780558939990c7.zip
Fix PR7272: when inlining through a callsite with byval arguments,
the newly created allocas may be used by inlined calls, so these need to have their tail call flags cleared. Fixes PR7272. llvm-svn: 105255
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp')
-rw-r--r--llvm/lib/Transforms/Utils/InlineFunction.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp
index 91390bc7bec..79c667a720a 100644
--- a/llvm/lib/Transforms/Utils/InlineFunction.cpp
+++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp
@@ -351,6 +351,10 @@ bool llvm::InlineFunction(CallSite CS, InlineFunctionInfo &IFI) {
// Uses of the argument in the function should use our new alloca
// instead.
ActualArg = NewAlloca;
+
+ // Calls that we inline may use the new alloca, so we need to clear
+ // their 'tail' flags.
+ MustClearTailCallFlags = true;
}
ValueMap[I] = ActualArg;
OpenPOWER on IntegriCloud