Merge remote-tracking branch 'origin/master' into master-next

This commit is contained in:
swift-ci
2017-04-22 11:48:31 -07:00
7 changed files with 163 additions and 16 deletions

View File

@@ -153,8 +153,7 @@ public:
if (InsertPt == BB->end())
return;
// Set the opened archetype context from the instruction.
this->getOpenedArchetypes().addOpenedArchetypeOperands(
InsertPt->getTypeDependentOperands());
addOpenedArchetypeOperands(&*InsertPt);
}
/// setInsertionPoint - Set the insertion point to insert before the specified
@@ -200,10 +199,7 @@ public:
//===--------------------------------------------------------------------===//
// Opened archetypes handling
//===--------------------------------------------------------------------===//
void addOpenedArchetypeOperands(SILInstruction *I) {
getOpenedArchetypes().addOpenedArchetypeOperands(
I->getTypeDependentOperands());
}
void addOpenedArchetypeOperands(SILInstruction *I);
//===--------------------------------------------------------------------===//
// Type remapping

View File

@@ -78,16 +78,19 @@ public:
// Can be used to incrementally populate the mapping, e.g.
// if it is done when performing a scan of all instructions
// inside a function.
void registerOpenedArchetypes(const SILInstruction *I);
// Returns true if any opened archetypes were registered.
bool registerOpenedArchetypes(const SILInstruction *I);
// Register opened archetypes whose definitions are referenced by
// the typedef operands of this instruction.
void registerUsedOpenedArchetypes(const SILInstruction *I);
// Returns true if any opened archetypes were registered.
bool registerUsedOpenedArchetypes(const SILInstruction *I);
// Register opened archetypes referenced by this type, if they
// are not registered yet. Create placeholders representing forward
// definitions of these opened archetypes.
void registerUsedOpenedArchetypes(CanType Ty);
// Returns true if any opened archetypes were registered.
bool registerUsedOpenedArchetypes(CanType Ty);
// Unregister archetypes opened by a given instruction.
// Should be only called when this instruction is to be removed.