mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Remove redundant Transform.getName() definitions.
At some point, pass definitions were heavily macro-ized. Pass descriptive names were added in two places. This is not only redundant but a source of confusion. You could waste a lot of time grepping for the wrong string. I removed all the getName() overrides which, at around 90 passes, was a fairly significant amount of code bloat. Any pass that we want to be able to invoke by name from a tool (sil-opt) or pipeline plan *should* have unique type name, enum value, commend-line string, and name string. I removed a comment about the various inliner passes that contradicted that. Side note: We should be consistent with the policy that a pass is identified by its type. We have a couple passes, LICM and CSE, which currently violate that convention.
This commit is contained in:
@@ -1602,7 +1602,6 @@ class COWArrayOptPass : public SILFunctionTransform {
|
||||
}
|
||||
}
|
||||
|
||||
StringRef getName() override { return "SIL COW Array Optimization"; }
|
||||
};
|
||||
} // end anonymous namespace
|
||||
|
||||
@@ -2346,7 +2345,6 @@ class SwiftArrayOptPass : public SILFunctionTransform {
|
||||
}
|
||||
}
|
||||
|
||||
StringRef getName() override { return "SIL Swift Array Optimization"; }
|
||||
};
|
||||
} // end anonymous namespace
|
||||
|
||||
|
||||
Reference in New Issue
Block a user