[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

@@ -82,6 +82,9 @@ private:
/// The function's global_init attribute.
unsigned GlobalInitFlag : 1;
/// The function's noinline attribute.
unsigned NoinlineFlag : 1;
/// The linkage of the function.
unsigned Linkage : NumSILLinkageBits;
@@ -94,6 +97,7 @@ private:
Optional<SILLocation> loc,
IsBare_t isBareSILFunction,
IsTransparent_t isTrans,
bool isNoinline,
SILFunction *insertBefore,
SILDebugScope *debugScope,
DeclContext *DC);
@@ -105,6 +109,7 @@ public:
Optional<SILLocation> loc = Nothing,
IsBare_t isBareSILFunction = IsNotBare,
IsTransparent_t isTrans = IsNotTransparent,
bool isNoinline = false,
SILFunction *InsertBefore = nullptr,
SILDebugScope *DebugScope = nullptr,
DeclContext *DC = nullptr);
@@ -190,6 +195,10 @@ public:
IsTransparent_t isTransparent() const { return IsTransparent_t(Transparent); }
void setTransparent(IsTransparent_t isT) { Transparent = isT; }
/// Get this function's noinline attribute.
bool isNoinline() const { return NoinlineFlag; }
void setNoinline(bool isNI) { NoinlineFlag = isNI; }
/// Get this function's global_init attribute.
///
/// The implied semantics are: