diff options
author | Gerolf Hoflehner <ghoflehner@apple.com> | 2014-04-17 19:14:06 +0000 |
---|---|---|
committer | Gerolf Hoflehner <ghoflehner@apple.com> | 2014-04-17 19:14:06 +0000 |
commit | d5e9413512a841b2a6cddd19ce1cccf2ff767054 (patch) | |
tree | 788927f1a681012d7543c655dea683d412170b36 /lib | |
parent | a32348530f4dd2afaa695233e77d129b2d79451b (diff) | |
download | llvm-d5e9413512a841b2a6cddd19ce1cccf2ff767054.tar.gz llvm-d5e9413512a841b2a6cddd19ce1cccf2ff767054.tar.bz2 llvm-d5e9413512a841b2a6cddd19ce1cccf2ff767054.tar.xz |
Reverse 206485.
After some discussions the preferred semantics of
the always_inline attribute is
inline always when the compiler can determine
that it it safe to do so.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206487 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Analysis/IPA/InlineCost.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/Analysis/IPA/InlineCost.cpp b/lib/Analysis/IPA/InlineCost.cpp index 683637f5b7..a803f8c3bf 100644 --- a/lib/Analysis/IPA/InlineCost.cpp +++ b/lib/Analysis/IPA/InlineCost.cpp @@ -1300,14 +1300,8 @@ bool InlineCostAnalysis::isInlineViable(Function &F) { F.getAttributes().hasAttribute(AttributeSet::FunctionIndex, Attribute::ReturnsTwice); for (Function::iterator BI = F.begin(), BE = F.end(); BI != BE; ++BI) { - // Disallow inlining of functions which contain an indirect branch, - // unless the always_inline attribute is set. - // The attribute serves as a assertion that no local address - // like a block label can escpape the function. - // Revisit enabling inlining for functions with indirect branches - // when a more sophisticated espape/points-to analysis becomes available. - if (isa<IndirectBrInst>(BI->getTerminator()) && - !F.hasFnAttribute(Attribute::AlwaysInline)) + // Disallow inlining of functions which contain an indirect branch. + if (isa<IndirectBrInst>(BI->getTerminator())) return false; for (BasicBlock::iterator II = BI->begin(), IE = BI->end(); II != IE; |