diff options
author | Sanjoy Das <sanjoy@playingwithpointers.com> | 2015-10-23 20:09:55 +0000 |
---|---|---|
committer | Sanjoy Das <sanjoy@playingwithpointers.com> | 2015-10-23 20:09:55 +0000 |
commit | 0a1bee8a80a1d11cc66790a50613f791b48269b0 (patch) | |
tree | 5afaad3a25cdd5d5efa19e055266bb9ccdf1ac54 /llvm/lib/Transforms/Utils/InlineFunction.cpp | |
parent | 48225b4433b579bac466e1baa34dd68dbf891485 (diff) | |
download | bcm5719-llvm-0a1bee8a80a1d11cc66790a50613f791b48269b0.tar.gz bcm5719-llvm-0a1bee8a80a1d11cc66790a50613f791b48269b0.zip |
[Inliner] Don't inline through callsites with operand bundles
Summary:
This change teaches the LLVM inliner to not inline through callsites
with unknown operand bundles. Currently all operand bundles are
"unknown" operand bundles but in the near future we will add support for
inlining through some select kinds of operand bundles.
Reviewers: reames, chandlerc, majnemer
Subscribers: llvm-commits
Differential Revision: http://reviews.llvm.org/D14001
llvm-svn: 251141
Diffstat (limited to 'llvm/lib/Transforms/Utils/InlineFunction.cpp')
-rw-r--r-- | llvm/lib/Transforms/Utils/InlineFunction.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Utils/InlineFunction.cpp b/llvm/lib/Transforms/Utils/InlineFunction.cpp index 5539a26b3f3..1507d313aa0 100644 --- a/llvm/lib/Transforms/Utils/InlineFunction.cpp +++ b/llvm/lib/Transforms/Utils/InlineFunction.cpp @@ -1029,6 +1029,10 @@ bool llvm::InlineFunction(CallSite CS, InlineFunctionInfo &IFI, CalledFunc->isDeclaration() || // call, or call to a vararg function! CalledFunc->getFunctionType()->isVarArg()) return false; + // The inliner does not know how to inline through calls with operand bundles. + if (CS.hasOperandBundles()) + return false; + // If the call to the callee cannot throw, set the 'nounwind' flag on any // calls that we inline. bool MarkNoUnwind = CS.doesNotThrow(); |