You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[AutoDiff] NFC: Reimplement PullbackCloner using pimpl pattern. (swiftlang#32778)
Reimplement `PullbackCloner` using the pointer-to-implementation pattern.
`PullbackCloner.h` is now tiny: `PullbackCloner` exposes only a `bool run()`
entry point.
All of the implementation is moved to `PullbackCloner::Implementation` in
`PullbackCloner.cpp`.
Benefits of this approach:
- A main benefit is that methods can be defined directly in `PullbackCloner.cpp`
without needing to separately declare them in `PullbackCloner.h`.
- There is now no code duplication between `PullbackCloner.h` and
`PullbackCloner.cpp`.
- Consequently, method documentation is easier to read because it appears
directly on method definitions, instead of on method declarations in a
separate file. This is important for documentation of `PullbackCloner`
instruction visitor methods, which explain pullback transformation rules.
- Incremental recompilation may be faster since `PullbackCloner.h` changes less
often.
Partially resolves SR-13182.
0 commit comments