Skip to content

Commit 9e5c2a0

Browse files
committed
Also cache storage class
1 parent 7561596 commit 9e5c2a0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mlir/lib/Dialect/SPIRV/IR/SPIRVTypes.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ class TypeExtensionVisitor {
4141
// Main visitor entry point. Adds all extensions to the vector. Saves `type`
4242
// as seen and dispatches to the right concrete `.add` function.
4343
void add(SPIRVType type) {
44-
if (auto [_it, inserted] = seen.insert(type); !inserted)
44+
if (auto [_it, inserted] = seen.insert({type, storage}); !inserted)
4545
return;
4646

4747
TypeSwitch<SPIRVType>(type)
@@ -70,7 +70,7 @@ class TypeExtensionVisitor {
7070

7171
SPIRVType::ExtensionArrayRefVector &extensions;
7272
std::optional<StorageClass> storage;
73-
llvm::SmallDenseSet<Type> seen;
73+
llvm::SmallDenseSet<std::pair<Type, std::optional<StorageClass>>> seen;
7474
};
7575

7676
} // namespace

0 commit comments

Comments
 (0)