| /llvm-project/clang/unittests/Serialization/ |
| H A D | InMemoryModuleCacheTest.cpp | 26 InMemoryModuleCache Cache; in TEST() local 27 EXPECT_EQ(InMemoryModuleCache::Unknown, Cache.getPCMState("B")); in TEST() 28 EXPECT_FALSE(Cache.isPCMFinal("B")); in TEST() 29 EXPECT_FALSE(Cache.shouldBuildPCM("B")); in TEST() 32 EXPECT_DEATH(Cache.tryToDropPCM("B"), "PCM to remove is unknown"); in TEST() 33 EXPECT_DEATH(Cache.finalizePCM("B"), "PCM to finalize is unknown"); in TEST() 41 InMemoryModuleCache Cache; in TEST() local 42 EXPECT_EQ(RawB, &Cache.addPCM("B", std::move(B))); in TEST() 43 EXPECT_EQ(InMemoryModuleCache::Tentative, Cache.getPCMState("B")); in TEST() 44 EXPECT_EQ(RawB, Cache.lookupPCM("B")); in TEST() [all …]
|
| /llvm-project/compiler-rt/lib/scudo/standalone/tests/ |
| H A D | quarantine_test.cpp | 31 static void deallocateCache(CacheT *Cache) { in deallocateCache() argument 32 while (scudo::QuarantineBatch *Batch = Cache->dequeueBatch()) in deallocateCache() 71 CacheT Cache; in TEST() local 73 Cache.init(); in TEST() 75 Cache.mergeBatches(&ToDeallocate); in TEST() 82 CacheT Cache; in TEST() local 83 Cache.init(); in TEST() 84 Cache.enqueue(Cb, FakePtr, BlockSize); in TEST() 85 EXPECT_EQ(BlockSize + sizeof(scudo::QuarantineBatch), Cache.getSize()); in TEST() 89 Cache.mergeBatches(&ToDeallocate); in TEST() [all …]
|
| H A D | primary_test.cpp | 214 typename Primary::CacheT Cache; in SCUDO_TYPED_TEST() local 215 Cache.init(nullptr, Allocator.get()); in SCUDO_TYPED_TEST() 224 void *P = Cache.allocate(ClassId); in SCUDO_TYPED_TEST() 229 Cache.deallocate(ClassId, Pointers[J]); in SCUDO_TYPED_TEST() 231 Cache.destroy(nullptr); in SCUDO_TYPED_TEST() 264 typename Primary::CacheT Cache; in TEST() local 267 Cache.init(&Stats, &Allocator); in TEST() 276 void *Ptr = Cache.allocate(ClassId); in TEST() 287 Cache.deallocate(ClassId, Ptr); in TEST() 289 Cache in TEST() 302 typename Primary::CacheT Cache; SCUDO_TYPED_TEST() local 345 static thread_local typename Primary::CacheT Cache; SCUDO_TYPED_TEST() local 399 typename Primary::CacheT Cache; SCUDO_TYPED_TEST() local 415 typename Primary::CacheT Cache; SCUDO_TYPED_TEST() local [all...] |
| /llvm-project/clang/test/Modules/ |
| H A D | pr62796.cppm | 5 // RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/Cache.cppm -o %t/Cache.pcm 6 // RUN: %clang_cc1 -std=c++20 %t/Use.cpp -fmodule-file=Fibonacci.Cache=%t/Cache.pcm \ 9 // RUN: %clang_cc1 -std=c++20 -emit-reduced-module-interface %t/Cache.cppm -o %t/Cache.pcm 10 // RUN: %clang_cc1 -std=c++20 %t/Use.cpp -fmodule-file=Fibonacci.Cache=%t/Cache.pcm \ 13 //--- Cache.cppm 14 export module Fibonacci.Cache; 44 constexpr unsigned long Cache = Compute(Number<N>{}, Strategy{}); 46 template constexpr unsigned long Cache<10ul>; 51 import Fibonacci.Cache; 53 constexpr bool value = Fibonacci::Cache<10ul> == 55;
|
| /llvm-project/llvm/unittests/ExecutionEngine/MCJIT/ |
| H A D | MCJITObjectCacheTest.cpp | 123 std::unique_ptr<TestObjectCache> Cache(new TestObjectCache); in TEST_F() local 130 TheJIT->setObjectCache(Cache.get()); in TEST_F() 133 const MemoryBuffer *ObjBuffer = Cache->getObjectInternal(SavedModulePointer); in TEST_F() 139 EXPECT_TRUE(Cache->wasModuleLookedUp(SavedModulePointer)); in TEST_F() 142 ObjBuffer = Cache->getObjectInternal(SavedModulePointer); in TEST_F() 146 EXPECT_FALSE(Cache->wereDuplicatesInserted()); in TEST_F() 152 std::unique_ptr<TestObjectCache> Cache(new TestObjectCache); in TEST_F() local 156 TheJIT->setObjectCache(Cache.get()); in TEST_F() 173 TheJIT->setObjectCache(Cache.get()); in TEST_F() 177 EXPECT_TRUE(Cache->wasModuleLookedUp(SecondModulePointer)); in TEST_F() [all …]
|
| /llvm-project/libcxx/test/libcxx/ranges/range.nonprop.cache/ |
| H A D | assign.move.pass.cpp | 42 using Cache = std::ranges::__non_propagating_cache<T>; in test() typedef 43 static_assert(std::is_nothrow_move_assignable_v<Cache>); in test() 47 Cache a; a.__emplace(3); in test() 48 Cache b; in test() 50 Cache& result = (b = std::move(a)); in test() 58 Cache a; a.__emplace(3); in test() 59 Cache b; b.__emplace(5); in test() 61 Cache& result = (b = std::move(a)); in test() 69 Cache b; in test() 71 Cache& result = (b = std::move(b)); in test() [all …]
|
| H A D | assign.copy.pass.cpp | 43 using Cache = std::ranges::__non_propagating_cache<T>; in test() typedef 44 static_assert(std::is_nothrow_copy_assignable_v<Cache>); in test() 48 Cache a; a.__emplace(3); in test() 49 Cache b; in test() 51 Cache& result = (b = a); in test() 61 Cache a; a.__emplace(3); in test() 62 Cache b; b.__emplace(5); in test() 64 Cache& result = (b = a); in test() 74 Cache b; in test() 75 Cache& result = (b = b); in test() [all …]
|
| H A D | emplace.pass.cpp | 37 using Cache = std::ranges::__non_propagating_cache<T>; in test() typedef 38 Cache cache; in test() 46 using Cache = std::ranges::__non_propagating_cache<T>; in test() typedef 47 Cache cache; in test() 54 using Cache = std::ranges::__non_propagating_cache<T>; in test() typedef 55 Cache cache; in test() 63 using Cache = std::ranges::__non_propagating_cache<T>; in test() typedef 64 Cache cache; in test() 71 using Cache = std::ranges::__non_propagating_cache<T>; in test() typedef 72 Cache cache; in test() [all …]
|
| H A D | emplace_from.pass.cpp | 37 using Cache = std::ranges::__non_propagating_cache<T>; in test() typedef 38 Cache cache; in test() 45 using Cache = std::ranges::__non_propagating_cache<T>; in test() typedef 46 Cache cache; in test() 53 using Cache = std::ranges::__non_propagating_cache<T>; in test() typedef 54 Cache cache; in test() 63 using Cache = std::ranges::__non_propagating_cache<NonMovable>; in test() typedef 64 Cache cache; in test()
|
| H A D | ctor.move.pass.cpp | 29 using Cache = std::ranges::__non_propagating_cache<T>; in test() typedef 30 static_assert(std::is_nothrow_move_constructible_v<Cache>); in test() 34 Cache a; in test() 37 Cache b(std::move(a)); in test() 44 Cache a; in test() 47 Cache b = std::move(a); in test()
|
| H A D | ctor.copy.pass.cpp | 37 using Cache = std::ranges::__non_propagating_cache<T>; in test() typedef 38 static_assert(std::is_nothrow_copy_constructible_v<Cache>); in test() 39 Cache a; in test() 44 Cache b(a); in test() 53 Cache b = a; in test()
|
| /llvm-project/compiler-rt/lib/sanitizer_common/tests/ |
| H A D | sanitizer_quarantine_test.cpp | 30 typedef QuarantineCache<QuarantineCallback> Cache; typedef 37 static void DeallocateCache(Cache *cache) { in DeallocateCache() 77 Cache cache; in TEST() 78 Cache to_deallocate; in TEST() 86 Cache cache; in TEST() 90 Cache to_deallocate; in TEST() 104 Cache from; in TEST() 106 Cache cache; in TEST() 112 Cache to_deallocate; in TEST() 127 Cache from; in TEST() [all …]
|
| /llvm-project/llvm/lib/Analysis/ |
| H A D | MemoryDependenceAnalysis.cpp | 708 static void AssertSorted(MemoryDependenceResults::NonLocalDepInfo &Cache, in getDependency() 711 Count = Cache.size(); in getDependency() 712 assert(std::is_sorted(Cache.begin(), Cache.begin() + Count) && in getDependency() 713 "Cache isn't sorted!"); in getDependency() 723 NonLocalDepInfo &Cache = CacheP.first; in getDependency() 730 if (!Cache.empty()) { in getDependency() 735 return Cache; 740 for (auto &Entry : Cache) in AssertSorted() 745 llvm::sort(Cache); 737 AssertSorted(MemoryDependenceResults::NonLocalDepInfo & Cache,int Count=-1) AssertSorted() argument 752 NonLocalDepInfo &Cache = CacheP.first; getNonLocalCallDependency() local 936 getNonLocalInfoForBlock(Instruction * QueryInst,const MemoryLocation & Loc,bool isLoad,BasicBlock * BB,NonLocalDepInfo * Cache,unsigned NumSortedEntries,BatchAAResults & BatchAA) getNonLocalInfoForBlock() argument 1021 SortNonLocalDepInfoCache(MemoryDependenceResults::NonLocalDepInfo & Cache,unsigned NumSortedEntries) SortNonLocalDepInfoCache() argument 1157 NonLocalDepInfo *Cache = &CacheInfo->NonLocalDeps; getNonLocalPointerDepFromBB() local [all...] |
| /llvm-project/compiler-rt/lib/tsan/rtl/ |
| H A D | tsan_dense_alloc.h | 38 typedef DenseSlabAllocCache Cache; typedef 39 typedef typename Cache::IndexT IndexT; 68 IndexT Alloc(Cache *c) { in Alloc() 74 void Free(Cache *c, IndexT idx) { in Free() 76 if (c->pos == Cache::kSize) in Free() 87 void FlushCache(Cache *c) { in FlushCache() 91 void InitCache(Cache *c) { in InitCache() 130 NOINLINE void Refill(Cache *c) { in Refill() 150 NOINLINE void Drain(Cache *c) { in Drain() 153 for (uptr i = 0; i < Cache::kSize / 2 && c->pos; i++) { in Drain() [all …]
|
| /llvm-project/compiler-rt/test/tsan/ |
| H A D | static_init2.cpp | 6 struct Cache { struct 8 explicit Cache(int x) in Cache() function 13 void foo(Cache *my) { in foo() 14 static Cache *c = my ? my : new Cache(rand()); in foo() 20 foo(new Cache(rand())); in Thread()
|
| H A D | static_init3.cpp | 7 struct Cache { struct 11 Cache g_cache; argument 13 Cache *CreateCache() { in CreateCache() 18 _Atomic(Cache*) queue; 21 static Cache *c = CreateCache(); in Thread1() 27 Cache *c = 0; in Thread2()
|
| H A D | static_init6.cpp | 7 struct Cache { struct 9 explicit Cache(int x) in Cache() argument 15 return new Cache((int)(long)p); in AsyncInit() 18 Cache *CreateCache() { in CreateCache() 23 return (Cache*)res; in CreateCache() 27 static Cache *c = CreateCache(); in Thread1()
|
| H A D | static_init5.cpp | 7 struct Cache { struct 9 explicit Cache(int x) in Cache() function 15 return new Cache((int)(long)p); in AsyncInit() 18 Cache *CreateCache() { in CreateCache() 23 return (Cache*)res; in CreateCache() 27 static Cache *c = CreateCache(); in Thread1()
|
| H A D | static_init4.cpp | 7 struct Cache { struct 9 explicit Cache(int x) in Cache() argument 16 Cache *CreateCache() { in CreateCache() 18 return new Cache(rand()); in CreateCache() 22 static Cache *c = CreateCache(); in Thread1()
|
| /llvm-project/llvm/lib/Target/NVPTX/ |
| H A D | NVPTXUtilities.cpp | 38 std::map<const Module *, global_val_annot_t> Cache; 50 AC.Cache.erase(Mod); in clearAnnotationCache() 123 AC.Cache[m][gv] = std::move(tmp); in cacheAnnotationFromMD() 131 if (AC.Cache.find(m) == AC.Cache.end()) in cacheAnnotationFromMD() 133 else if (AC.Cache[m].find(gv) == AC.Cache[m].end()) in findOneNVVMAnnotation() 135 if (AC.Cache[m][gv].find(prop) == AC.Cache[m][gv].end()) in findOneNVVMAnnotation() 137 return AC.Cache[ in findOneNVVMAnnotation() 40 std::map<const Module *, global_val_annot_t> Cache; global() member [all...] |
| /llvm-project/llvm/lib/IR/ |
| H A D | DebugLoc.cpp | 72 DenseMap<const MDNode *, MDNode *> &Cache) { in replaceInlinedAtSubprogram() argument 79 if (auto It = Cache.find(Loc); It != Cache.end()) { in replaceInlinedAtSubprogram() 92 *LocToUpdate->getScope(), NewSP, Ctx, Cache); in replaceInlinedAtSubprogram() 95 Cache[LocToUpdate] = UpdatedLoc; in replaceInlinedAtSubprogram() 104 Cache[LocToUpdate] = UpdatedLoc; in replaceInlinedAtSubprogram() 112 DenseMap<const MDNode *, MDNode *> &Cache) { in appendInlinedAt() argument 120 if (auto *Found = Cache[IA]) { in appendInlinedAt() 133 Cache[MD] = Last = DILocation::getDistinct( in appendInlinedAt()
|
| /llvm-project/clang/lib/StaticAnalyzer/Checkers/WebKit/ |
| H A D | PtrTypesSemantics.cpp | 345 auto CacheIt = Cache.find(S); in VisitCaseStmt() 346 if (CacheIt != Cache.end()) in VisitDefaultStmt() 364 Cache[S] = Result; in VisitCompoundAssignOperator() 372 TrivialFunctionAnalysisVisitor(CacheTy &Cache) : Cache(Cache) {} in VisitArraySubscriptExpr() 586 if (!TrivialFunctionAnalysis::isTrivialImpl(Temp->getDestructor(), Cache)) 640 CacheTy &Cache; 645 const Decl *D, TrivialFunctionAnalysis::CacheTy &Cache) { 646 TrivialFunctionAnalysisVisitor V(Cache); 272 TrivialFunctionAnalysisVisitor(CacheTy & Cache) TrivialFunctionAnalysisVisitor() argument 552 CacheTy &Cache; global() member in clang::TrivialFunctionAnalysisVisitor 557 isTrivialImpl(const Decl * D,TrivialFunctionAnalysis::CacheTy & Cache) isTrivialImpl() argument 563 isTrivialImpl(const Stmt * S,TrivialFunctionAnalysis::CacheTy & Cache) isTrivialImpl() argument [all...] |
| /llvm-project/clang-tools-extra/clangd/ |
| H A D | ConfigProvider.cpp | 61 mutable FileConfigCache Cache; // threadsafe in fromYAMLFile() member in clang::clangd::config::Provider::fromYAMLFile::AbsFileProvider 68 Cache.get(FS, DC, P.FreshTime, Trusted, Result); in fromYAMLFile() 75 : Cache(Path, Directory), FS(FS), Trusted(Trusted) { in fromYAMLFile() 95 mutable llvm::StringMap<FileConfigCache> Cache; in fromAncestorRelativeYAMLFiles() member in clang::clangd::config::Provider::fromAncestorRelativeYAMLFiles::RelFileProvider 115 auto It = Cache.find(Ancestor); in fromAncestorRelativeYAMLFiles() 117 if (It == Cache.end()) { in fromAncestorRelativeYAMLFiles() 122 It = Cache.try_emplace(Ancestor, ConfigPath.str(), Ancestor).first; in fromAncestorRelativeYAMLFiles() 130 for (FileConfigCache *Cache : llvm::reverse(Caches)) in fromAncestorRelativeYAMLFiles() 131 Cache->get(FS, DC, P.FreshTime, Trusted, Result); in fromAncestorRelativeYAMLFiles()
|
| /llvm-project/compiler-rt/lib/scudo/standalone/ |
| H A D | quarantine.h | 189 Cache.init(); in init() 198 return Cache.getSize() == 0U; in isEmpty() 211 Cache.transfer(C); in drain() 212 needRecycle = Cache.getSize() > getMaxSize(); in drain() 222 Cache.transfer(C); in drainAndRecycle() 231 Cache.getStats(Str); in getStats() 250 CacheT Cache GUARDED_BY(CacheMutex); 267 const uptr CacheSize = Cache.getSize(); in recycle() 268 const uptr OverheadSize = Cache.getOverheadSize(); in recycle() 277 Cache.mergeBatches(&Tmp); in recycle() [all …]
|
| /llvm-project/bolt/include/bolt/Passes/ |
| H A D | ReorderUtils.h | 73 : Size(Size), Cache(Size * Size), Valid(Size * Size, false) {} in ClusterPairCache() 81 return Cache[index(First, Second)]; in get() 86 Cache[Index] = Value; in set() 102 std::vector<ValueType> Cache; variable 114 : Size(Size), Cache(Size * Size), Valid(Size * Size, false) {} in ClusterPairCacheThreadSafe() 122 return Cache[index(First, Second)]; in get() 127 Cache[Index] = Value; in set() 141 std::vector<ValueType> Cache; variable
|