IRGen: in multi-threaded compilation, create all specializations of a function in the same LLVM module.

This increases the chances that multiple specializations from the same function can be merged with LLVM's function merge pass.
This commit is contained in:
Erik Eckstein
2020-01-21 15:21:09 +01:00
parent 203a2b657b
commit cabcecc97e
6 changed files with 46 additions and 1 deletions

View File

@@ -863,6 +863,10 @@ public:
validateSubclassScope(getClassSubclassScope(), isThunk(), Info);
SpecializationInfo = Info;
}
/// If this function is a specialization, return the original function from
/// which this function was specialized.
const SILFunction *getOriginOfSpecialization() const;
/// Retrieve the generic environment containing the mapping from interface
/// types to context archetypes for this function. Only present if the