Home | History | Annotate | Download | only in MCJIT

Lines Matching refs:Cache

41     // Our test cache wants to maintain ownership of its object buffers
96 // We may be using a null cache, so ensure compilation is valid.
124 std::unique_ptr<TestObjectCache> Cache(new TestObjectCache);
131 TheJIT->setObjectCache(Cache.get());
133 // Verify that our object cache does not contain the module yet.
134 const MemoryBuffer *ObjBuffer = Cache->getObjectInternal(SavedModulePointer);
139 // Verify that MCJIT tried to look-up this module in the cache.
140 EXPECT_TRUE(Cache->wasModuleLookedUp(SavedModulePointer));
142 // Verify that our object cache now contains the module.
143 ObjBuffer = Cache->getObjectInternal(SavedModulePointer);
146 // Verify that the cache was only notified once.
147 EXPECT_FALSE(Cache->wereDuplicatesInserted());
153 std::unique_ptr<TestObjectCache> Cache(new TestObjectCache);
157 TheJIT->setObjectCache(Cache.get());
167 // tell if MCJIT compiled this module or used the cache.
174 TheJIT->setObjectCache(Cache.get());
177 // Verify that MCJIT tried to look-up this module in the cache.
178 EXPECT_TRUE(Cache->wasModuleLookedUp(SecondModulePointer));
180 // Verify that MCJIT didn't try to cache this again.
181 EXPECT_FALSE(Cache->wereDuplicatesInserted());
187 std::unique_ptr<TestObjectCache> Cache(new TestObjectCache);
191 TheJIT->setObjectCache(Cache.get());
201 // tell if MCJIT compiled this module or used the cache. Note that we use
202 // a new module name here so the module shouldn't be found in the cache.
209 TheJIT->setObjectCache(Cache.get());
211 // Verify that our object cache does not contain the module yet.
212 const MemoryBuffer *ObjBuffer = Cache->getObjectInternal(SecondModulePointer);
218 // Verify that MCJIT tried to look-up this module in the cache.
219 EXPECT_TRUE(Cache->wasModuleLookedUp(SecondModulePointer));
221 // Verify that our object cache now contains the module.
222 ObjBuffer = Cache->getObjectInternal(SecondModulePointer);
225 // Verify that MCJIT didn't try to cache this again.
226 EXPECT_FALSE(Cache->wereDuplicatesInserted());