diff --git a/mlir/include/mlir/Dialect/Bufferization/Transforms/BufferViewFlowAnalysis.h b/mlir/include/mlir/Dialect/Bufferization/Transforms/BufferViewFlowAnalysis.h --- a/mlir/include/mlir/Dialect/Bufferization/Transforms/BufferViewFlowAnalysis.h +++ b/mlir/include/mlir/Dialect/Bufferization/Transforms/BufferViewFlowAnalysis.h @@ -55,7 +55,7 @@ ValueSetT resolve(Value value) const; /// Removes the given values from all alias sets. - void remove(const SmallPtrSetImpl &aliasValues); + void remove(const SetVector &aliasValues); private: /// This function constructs a mapping from values to its immediate diff --git a/mlir/lib/Dialect/Bufferization/Transforms/BufferDeallocation.cpp b/mlir/lib/Dialect/Bufferization/Transforms/BufferDeallocation.cpp --- a/mlir/lib/Dialect/Bufferization/Transforms/BufferDeallocation.cpp +++ b/mlir/lib/Dialect/Bufferization/Transforms/BufferDeallocation.cpp @@ -259,7 +259,7 @@ // Initialize the set of values that require a dedicated memory free // operation since their operands cannot be safely deallocated in a post // dominator. - SmallPtrSet valuesToFree; + SetVector valuesToFree; llvm::SmallDenseSet> visitedValues; SmallVector, 8> toProcess; diff --git a/mlir/lib/Dialect/Bufferization/Transforms/BufferViewFlowAnalysis.cpp b/mlir/lib/Dialect/Bufferization/Transforms/BufferViewFlowAnalysis.cpp --- a/mlir/lib/Dialect/Bufferization/Transforms/BufferViewFlowAnalysis.cpp +++ b/mlir/lib/Dialect/Bufferization/Transforms/BufferViewFlowAnalysis.cpp @@ -12,6 +12,7 @@ #include "mlir/Interfaces/ControlFlowInterfaces.h" #include "mlir/Interfaces/ViewLikeInterface.h" #include "llvm/ADT/SetOperations.h" +#include "llvm/ADT/SetVector.h" using namespace mlir; @@ -40,7 +41,7 @@ } /// Removes the given values from all alias sets. -void BufferViewFlowAnalysis::remove(const SmallPtrSetImpl &aliasValues) { +void BufferViewFlowAnalysis::remove(const SetVector &aliasValues) { for (auto &entry : dependencies) llvm::set_subtract(entry.second, aliasValues); }