Skip to content

Commit

Permalink
Add gcloaded TT (#2125)
Browse files Browse the repository at this point in the history
* Add gcloaded TT

* fix

* fix
  • Loading branch information
wsmoses authored Oct 21, 2024
1 parent 73b7810 commit a6ba079
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions enzyme/Enzyme/TypeAnalysis/TypeAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4780,6 +4780,20 @@ void TypeAnalyzer::visitCallBase(CallBase &call) {
updateAnalysis(&call, TypeTree(BaseType::Pointer).Only(-1, &call), &call);
return;
}
if (funcName == "julia.gc_loaded") {
if (direction & UP)
updateAnalysis(call.getArgOperand(1), getAnalysis(&call), &call);
if (direction & DOWN)
updateAnalysis(&call, getAnalysis(call.getArgOperand(1)), &call);
return;
}
if (funcName == "julia.pointer_from_objref") {
if (direction & UP)
updateAnalysis(call.getArgOperand(0), getAnalysis(&call), &call);
if (direction & DOWN)
updateAnalysis(&call, getAnalysis(call.getArgOperand(0)), &call);
return;
}
if (funcName == "_ZNSt6chrono3_V212steady_clock3nowEv") {
updateAnalysis(&call, TypeTree(BaseType::Integer).Only(-1, &call), &call);
return;
Expand Down

0 comments on commit a6ba079

Please sign in to comment.