The "optimization" would replace the AffineMap for an empty shape with a 0 to represent its indexing (stride * dimension) logic. Meanwhile other pieces of core logic (such as getStridesAndOffset and makeStridedLinearLayoutMap) require strides for all dimensions to ensure no aliasing can occur which would occur if the shape was not empty. For now, this optimization is removed as different pieces of core types disagree on this, so the optimization should be caller supplied or should be consistent throughout the infrastructure.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
I'm going to land this as I suspect there are no strong feelings over this change and there was a lack of failing tests to show people might rely on this, but if anyone has concerns, please feel free to revert and raise your concerns, as this commit was not in review for long. For any abstract concerns though, please keep in mind that the existing code failed in multiple situations, and only worked in limited code paths.