Skip to content

Commit cef4178

Browse files
authored
[Codegen][NFC] Switch Dim::Kind output stream to use existing methods. (#19293)
The `convertSwizzleKindToString` has the same implementation. The revision switch the implementation to use the method directly. Signed-off-by: hanhanW <[email protected]>
1 parent 2e2c109 commit cef4178

File tree

1 file changed

+1
-12
lines changed
  • compiler/src/iree/compiler/Codegen/Dialect/Codegen/Utils

1 file changed

+1
-12
lines changed

compiler/src/iree/compiler/Codegen/Dialect/Codegen/Utils/Utils.cpp

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,18 +36,7 @@ bool operator!=(const TileSwizzle &lhs, const TileSwizzle &rhs) {
3636

3737
llvm::raw_ostream &operator<<(llvm::raw_ostream &os,
3838
TileSwizzle::Dim::Kind kind) {
39-
switch (kind) {
40-
case TileSwizzle::Dim::Kind::Internal:
41-
return os << "Internal";
42-
case TileSwizzle::Dim::Kind::CrossThread:
43-
return os << "CrossThread";
44-
case TileSwizzle::Dim::Kind::CrossIntrinsic:
45-
return os << "CrossIntrinsic";
46-
default:
47-
// Required by GCC.
48-
assert(false);
49-
return os;
50-
}
39+
return os << convertSwizzleKindToString(kind);
5140
}
5241

5342
llvm::raw_ostream &operator<<(llvm::raw_ostream &os, TileSwizzle::Dim dim) {

0 commit comments

Comments
 (0)