summaryrefslogtreecommitdiffstats
path: root/mlir/lib/Support/StorageUniquer.cpp
diff options
context:
space:
mode:
authorRiver Riddle <riverriddle@google.com>2019-12-18 09:28:48 -0800
committerA. Unique TensorFlower <gardener@tensorflow.org>2019-12-18 09:29:20 -0800
commit4562e389a43caa2e30ebf277c12743edafe6a0ac (patch)
tree1901855666adba9be9576e864877fe191e197085 /mlir/lib/Support/StorageUniquer.cpp
parent24ab8362f2099ed42f2e05f09fb9323ad0c5ab27 (diff)
downloadbcm5719-llvm-4562e389a43caa2e30ebf277c12743edafe6a0ac.tar.gz
bcm5719-llvm-4562e389a43caa2e30ebf277c12743edafe6a0ac.zip
NFC: Remove unnecessary 'llvm::' prefix from uses of llvm symbols declared in `mlir` namespace.
Aside from being cleaner, this also makes the codebase more consistent. PiperOrigin-RevId: 286206974
Diffstat (limited to 'mlir/lib/Support/StorageUniquer.cpp')
-rw-r--r--mlir/lib/Support/StorageUniquer.cpp31
1 files changed, 15 insertions, 16 deletions
diff --git a/mlir/lib/Support/StorageUniquer.cpp b/mlir/lib/Support/StorageUniquer.cpp
index 3672c0f3759..cae4dce143f 100644
--- a/mlir/lib/Support/StorageUniquer.cpp
+++ b/mlir/lib/Support/StorageUniquer.cpp
@@ -39,7 +39,7 @@ struct StorageUniquerImpl {
unsigned hashValue;
/// An equality function for comparing with an existing storage instance.
- llvm::function_ref<bool(const BaseStorage *)> isEqual;
+ function_ref<bool(const BaseStorage *)> isEqual;
};
/// A utility wrapper object representing a hashed storage object. This class
@@ -52,8 +52,8 @@ struct StorageUniquerImpl {
/// Get or create an instance of a complex derived type.
BaseStorage *
getOrCreate(unsigned kind, unsigned hashValue,
- llvm::function_ref<bool(const BaseStorage *)> isEqual,
- llvm::function_ref<BaseStorage *(StorageAllocator &)> ctorFn) {
+ function_ref<bool(const BaseStorage *)> isEqual,
+ function_ref<BaseStorage *(StorageAllocator &)> ctorFn) {
LookupKey lookupKey{kind, hashValue, isEqual};
// Check for an existing instance in read-only mode.
@@ -83,7 +83,7 @@ struct StorageUniquerImpl {
/// Get or create an instance of a simple derived type.
BaseStorage *
getOrCreate(unsigned kind,
- llvm::function_ref<BaseStorage *(StorageAllocator &)> ctorFn) {
+ function_ref<BaseStorage *(StorageAllocator &)> ctorFn) {
// Check for an existing instance in read-only mode.
{
llvm::sys::SmartScopedReader<true> typeLock(mutex);
@@ -107,8 +107,8 @@ struct StorageUniquerImpl {
/// Erase an instance of a complex derived type.
void erase(unsigned kind, unsigned hashValue,
- llvm::function_ref<bool(const BaseStorage *)> isEqual,
- llvm::function_ref<void(BaseStorage *)> cleanupFn) {
+ function_ref<bool(const BaseStorage *)> isEqual,
+ function_ref<void(BaseStorage *)> cleanupFn) {
LookupKey lookupKey{kind, hashValue, isEqual};
// Acquire a writer-lock so that we can safely erase the type instance.
@@ -127,9 +127,9 @@ struct StorageUniquerImpl {
//===--------------------------------------------------------------------===//
/// Utility to create and initialize a storage instance.
- BaseStorage *initializeStorage(
- unsigned kind,
- llvm::function_ref<BaseStorage *(StorageAllocator &)> ctorFn) {
+ BaseStorage *
+ initializeStorage(unsigned kind,
+ function_ref<BaseStorage *(StorageAllocator &)> ctorFn) {
BaseStorage *storage = ctorFn(allocator);
storage->kind = kind;
return storage;
@@ -162,11 +162,11 @@ struct StorageUniquerImpl {
};
// Unique types with specific hashing or storage constraints.
- using StorageTypeSet = llvm::DenseSet<HashedStorage, StorageKeyInfo>;
+ using StorageTypeSet = DenseSet<HashedStorage, StorageKeyInfo>;
StorageTypeSet storageTypes;
// Unique types with just the kind.
- llvm::DenseMap<unsigned, BaseStorage *> simpleTypes;
+ DenseMap<unsigned, BaseStorage *> simpleTypes;
// Allocator to use when constructing derived type instances.
StorageUniquer::StorageAllocator allocator;
@@ -184,7 +184,7 @@ StorageUniquer::~StorageUniquer() {}
/// complex storage.
auto StorageUniquer::getImpl(
unsigned kind, unsigned hashValue,
- llvm::function_ref<bool(const BaseStorage *)> isEqual,
+ function_ref<bool(const BaseStorage *)> isEqual,
std::function<BaseStorage *(StorageAllocator &)> ctorFn) -> BaseStorage * {
return impl->getOrCreate(kind, hashValue, isEqual, ctorFn);
}
@@ -199,9 +199,8 @@ auto StorageUniquer::getImpl(
/// Implementation for erasing an instance of a derived type with complex
/// storage.
-void StorageUniquer::eraseImpl(
- unsigned kind, unsigned hashValue,
- llvm::function_ref<bool(const BaseStorage *)> isEqual,
- std::function<void(BaseStorage *)> cleanupFn) {
+void StorageUniquer::eraseImpl(unsigned kind, unsigned hashValue,
+ function_ref<bool(const BaseStorage *)> isEqual,
+ std::function<void(BaseStorage *)> cleanupFn) {
impl->erase(kind, hashValue, isEqual, cleanupFn);
}
OpenPOWER on IntegriCloud