-
Notifications
You must be signed in to change notification settings - Fork 584
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[CodeGen][Common] Switch to new pass generation tablegen definitions. (…
…#18166) This is not a NFC change because there are non-trivial changes in three passes. The rest are just switching to the new tablegen definition style. The revision applies few cleanups during refactoring, which includes: - Make all the passes have `iree-codegen-*` prefix. - Make filename match the pass name. - Switch namespaces to the single-line syntax. The non-trivial changes happen in `IREEComprehensiveBufferizePass`, `TileAndDistributeToWorkgroupsPass`, and `TransformDialectInterpreterPass`. In the `IREEComprehensiveBufferizePass`, the default allocationFn and memcpyFn values are no longer `std::nullopt`. They are the default functions that implemented in the file. It matches the behavior. The only difference is that it does not rely on users to pass `std::nullopt` to trigger the "default" behavior. Instead, it initialize the default value of the class members be them. This saves one level of nesting logic. In the `TileAndDistributeToWorkgroupsPass`, it switches to use `clEnumValN`. Without the change, the values in `.td` are magic numbers. Now we explicitly tie them to linalg::DistributionMethod. In `TransformDialectInterpreterPass`, it no longer uses `--iree-codegen-transform-dialect-library` to get the library path. Instead, users should use the predefined option (i.e., `library-file-name`) to specify the path. The old behavior was a hack because the pass itself should not access external variable if possible. The `--iree-codegen-transform-dialect-library` is still valid, but the lit test does not use it anymore. Because it is very tricky to teach tablegen to generate such behavior. --------- Signed-off-by: hanhanW <[email protected]>
- Loading branch information
Showing
72 changed files
with
535 additions
and
959 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.