mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +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:
@@ -1156,10 +1156,6 @@ class SILCSE : public SILFunctionTransform {
|
||||
}
|
||||
}
|
||||
|
||||
StringRef getName() override {
|
||||
return RunsOnHighLevelSil ? "High-level CSE" : "CSE";
|
||||
}
|
||||
|
||||
public:
|
||||
SILCSE(bool RunsOnHighLevelSil) : RunsOnHighLevelSil(RunsOnHighLevelSil) {}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user