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 | ecebc3730e1890929730c8a34f187fab802aeba8 (patch) | |
| tree | 59619062c8e521b821c6e7737267f75a0820b174 /llvm/lib/Analysis | |
| parent | adfde5fef6f667870c510d05bf6b09839ba02e4b (diff) | |
| download | bcm5719-llvm-ecebc3730e1890929730c8a34f187fab802aeba8.tar.gz bcm5719-llvm-ecebc3730e1890929730c8a34f187fab802aeba8.zip | |
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.
llvm-svn: 206487
Diffstat (limited to 'llvm/lib/Analysis')
| -rw-r--r-- | llvm/lib/Analysis/IPA/InlineCost.cpp | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/llvm/lib/Analysis/IPA/InlineCost.cpp b/llvm/lib/Analysis/IPA/InlineCost.cpp index 683637f5b7f..a803f8c3bf9 100644 --- a/llvm/lib/Analysis/IPA/InlineCost.cpp +++ b/llvm/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; |

