Implement inline scopes for the performance inliner.

Mandatory-inlined (aka transparent functions) are still treated as if they
had the location and scope of the call site. <rdar://problem/14845844>
Support inline scopes once we have an optimizing SIL-based inliner

Patch by Adrian Prantl.

Swift SVN r18835
This commit is contained in:
Bob Wilson
2014-06-12 19:48:43 +00:00
parent fe63f7d35c
commit 2df66cf8c4
19 changed files with 252 additions and 77 deletions

View File

@@ -11,6 +11,7 @@
//===----------------------------------------------------------------------===//
#define DEBUG_TYPE "sil-module"
#include "swift/SIL/SILDebugScope.h"
#include "swift/SIL/SILModule.h"
#include "swift/SIL/SILExternalSource.h"
#include "swift/SIL/SILVisitor.h"
@@ -232,8 +233,10 @@ SILFunction *SILModule::getOrCreateFunction(SILLocation loc,
return fn;
}
return SILFunction::create(*this, linkage, name, type, nullptr,
loc, isBareSILFunction, isTransparent);
auto fn = SILFunction::create(*this, linkage, name, type, nullptr,
loc, isBareSILFunction, isTransparent);
fn->setDebugScope(new (*this) SILDebugScope(loc, *fn));
return fn;
}
SILFunction *SILModule::getOrCreateSharedFunction(SILLocation loc,