This revision replaces current type cast constant folder with a new common type cast constant folder function template.
It will cover all former folder and support fold the constant splat and vector.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
Could you please add a longer commit description that motivates this change? From what I can see, it replaces a small amount of boilerplate with a longer and complex utility function; not sure if the trade off is the right one here.
mlir/include/mlir/Dialect/CommonFolders.h | ||
---|---|---|
117 | Nit: either const & or &&. | |
118 | ||
140 | Nit: no else after return. |
Comment Actions
OK, after the replacing, we could fold constant splat and contant vector, not only the constant integer or float.
Comment Actions
Then please (1) update the commit/diff description accordingly (the short version better highlight the added functionality, and the long version should explain why the change is made) and (2) add tests that exercise the vector versions.
Nit: either const & or &&.