Don't rerun diagnostic passes on deserialized SIL.

This commit is contained in:
Andrew Trick
2018-02-02 09:57:42 -08:00
parent 0dfce6c0f6
commit 4734920222
11 changed files with 53 additions and 1 deletions

View File

@@ -944,6 +944,10 @@ namespace {
class AllocBoxToStack : public SILFunctionTransform {
/// The entry point to the transformation.
void run() override {
// Don't rerun on deserialized functions. Nothing should have changed.
if (getFunction()->wasDeserializedCanonical())
return;
AllocBoxToStackState pass(this);
for (auto &BB : *getFunction()) {
for (auto &I : BB)