Skip to content

Commit

Permalink
Ignore fenceinst for caching (#1878)
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses committed May 13, 2024
1 parent d18f50c commit 611912e
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions enzyme/Enzyme/EnzymeLogic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,11 @@ struct CacheAnalysis {
if (!inst2->mayWriteToMemory())
return false;

#if LLVM_VERSION_MAJOR >= 12
if (isa<FenceInst>(inst2))
return false;
#endif

if (unnecessaryBlocks.count(inst2->getParent())) {
return false;
}
Expand All @@ -352,6 +357,11 @@ struct CacheAnalysis {
if (!mid->mayWriteToMemory())
return false;

#if LLVM_VERSION_MAJOR >= 12
if (isa<FenceInst>(mid))
return false;
#endif

if (unnecessaryBlocks.count(mid->getParent())) {
return false;
}
Expand Down

0 comments on commit 611912e

Please sign in to comment.