[Lowering] Make the AddressLowering pass functional.

This commit is contained in:
Andrew Trick
2016-10-28 16:40:41 -07:00
parent 855918c620
commit 10b118dfa9
3 changed files with 701 additions and 0 deletions

View File

@@ -56,9 +56,16 @@ public:
static bool isReturnedIndirectlyInSIL(SILType type, SILModule &M);
static SILModuleConventions getLoweredAddressConventions() {
return SILModuleConventions(true);
}
private:
bool loweredAddresses;
SILModuleConventions(bool loweredAddresses)
: loweredAddresses(loweredAddresses) {}
public:
SILModuleConventions(const SILModule &M);
@@ -273,6 +280,8 @@ public:
// side. See ApplySite::getCallArgIndexOfFirstAppliedArg().
//===--------------------------------------------------------------------===//
unsigned getSILArgIndexOfFirstIndirectResult() const { return 0; }
unsigned getSILArgIndexOfFirstParam() const {
return getNumIndirectSILResults();
}