Skip to content

Commit

Permalink
Fix enzyme_nocache (#2146)
Browse files Browse the repository at this point in the history
* Fix enzyme_nocache

* fix

* fix
  • Loading branch information
wsmoses authored Nov 3, 2024
1 parent 5ba7dcb commit b6ab325
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion enzyme/Enzyme/EnzymeLogic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ struct CacheAnalysis {
return false;
}

if (hasMetadata(&li, "enzyme_force_recompute"))
if (hasNoCache(&li))
return false;

if (EnzymeJuliaAddrLoad)
Expand Down
3 changes: 3 additions & 0 deletions enzyme/Enzyme/Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -1181,6 +1181,9 @@ static inline bool hasNoCache(llvm::Value *op) {
return true;
}
}
if (auto I = dyn_cast<Instruction>(op))
if (hasMetadata(I, "enzyme_nocache"))
return true;
return false;
}

Expand Down

0 comments on commit b6ab325

Please sign in to comment.