We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 84d834b commit f951148Copy full SHA for f951148
enzyme/Enzyme/EnzymeLogic.cpp
@@ -240,6 +240,14 @@ struct CacheAnalysis {
240
if (PT->getAddressSpace() == 13)
241
return false;
242
243
+#if LLVM_VERSION_MAJOR >= 10
244
+ if (li.hasMetadata(LLVMContext::MD_invariant_load))
245
+ return false;
246
+#else
247
+ if (li.getMetadata(LLVMContext::MD_invariant_load))
248
249
+#endif
250
+
251
// Find the underlying object for the pointer operand of the load
252
// instruction.
253
auto obj =
@@ -390,7 +398,7 @@ struct CacheAnalysis {
390
398
return {};
391
399
}
392
400
393
- if (isCertainPrintMallocOrFree(Fn)) {
401
+ if (isCertainPrintMallocOrFree(Fn) || isAllocationFunction(*Fn, TLI)) {
394
402
395
403
396
404
0 commit comments