Skip to content

Commit

Permalink
Fix forward rewrite (#2201)
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses authored Dec 22, 2024
1 parent b387a38 commit a03c1d4
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions enzyme/Enzyme/CallDerivatives.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3236,6 +3236,13 @@ bool AdjointGenerator::handleKnownCallDerivatives(
CI->setCallingConv(call.getCallingConv());
CI->setTailCallKind(call.getTailCallKind());
CI->setDebugLoc(dbgLoc);

if (funcName == "julia.gc_alloc_obj" ||
funcName == "jl_gc_alloc_typed" ||
funcName == "ijl_gc_alloc_typed") {
if (EnzymeShadowAllocRewrite)
EnzymeShadowAllocRewrite(wrap(CI), gutils);
}
return CI;
};

Expand Down

0 comments on commit a03c1d4

Please sign in to comment.