Allow inlining of functions with returns_twice calls, if they have the

attribute themselve.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@146851 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Joerg Sonnenberger
2011-12-18 20:35:43 +00:00
parent 2ea4cdb81f
commit 3470693641
6 changed files with 70 additions and 22 deletions

View File

@ -31,8 +31,9 @@ namespace llvm {
/// caller.
// bool NeverInline;
// True if this function contains a call to setjmp or _setjmp
bool callsSetJmp;
// True if this function contains a call to setjmp or other functions
// with attribute "returns twice" without having the attribute by itself.
bool exposesReturnsTwice;
// True if this function calls itself
bool isRecursive;
@ -66,7 +67,7 @@ namespace llvm {
/// NumRets - Keep track of how many Ret instructions the block contains.
unsigned NumRets;
CodeMetrics() : callsSetJmp(false), isRecursive(false),
CodeMetrics() : exposesReturnsTwice(false), isRecursive(false),
containsIndirectBr(false), usesDynamicAlloca(false),
NumInsts(0), NumBlocks(0), NumCalls(0),
NumInlineCandidates(0), NumVectorInsts(0),