[AutoDiff upstream] Add SIL differentiability witness serialization. (#29642)

SIL differentiability witnesses are a new top-level SIL construct mapping
an "original" SIL function and derivative configuration to derivative SIL
functions.

This patch adds `SILDifferentiabilityWitness` serialization/deserialization.

Resolves TF-1136.
This commit is contained in:
Dan Zheng
2020-02-07 09:35:16 -08:00
committed by GitHub
parent bd26447921
commit 7b064a6500
11 changed files with 331 additions and 13 deletions

View File

@@ -637,6 +637,10 @@ public:
llvm::ArrayRef<SILDifferentiabilityWitness *>
lookUpDifferentiabilityWitnessesForFunction(StringRef name);
/// Attempt to deserialize the SILDifferentiabilityWitness. Returns true if
/// deserialization succeeded, false otherwise.
bool loadDifferentiabilityWitness(SILDifferentiabilityWitness *dw);
// Given a protocol, attempt to create a default witness table declaration
// for it.
SILDefaultWitnessTable *