[noinline attribute] add noinline attribute.

Propagate it to SILFunction and use it in PerformanceInliner. We also serialize
and parse the attribute.

rdar://15882816


Swift SVN r19150
This commit is contained in:
Manman Ren
2014-06-24 23:07:45 +00:00
parent b1bfbf8ceb
commit 7667b829bb
23 changed files with 92 additions and 18 deletions

View File

@@ -336,7 +336,8 @@ SILFunction *SILGenModule::getFunction(SILDeclRef constant,
SmallVector<char, 128> buffer;
auto *F = SILFunction::create(M, linkage, constant.mangle(buffer),
constantType, nullptr,
Nothing, IsNotBare, IsTrans);
Nothing, IsNotBare, IsTrans,
constant.isNoinline());
F->setGlobalInit(constant.isGlobal());
@@ -646,7 +647,7 @@ SILFunction *SILGenModule::emitLazyGlobalInitializer(StringRef funcName,
auto *f =
SILFunction::create(M, SILLinkage::Private, funcName,
initSILType, nullptr,
binding, IsNotBare, IsNotTransparent);
binding, IsNotBare, IsNotTransparent, false);
f->setDebugScope(new (M)
SILDebugScope(RegularLocation(binding->getInit()), *f));
f->setLocation(binding);