Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion enzyme/Enzyme/CallDerivatives.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4129,6 +4129,7 @@ bool AdjointGenerator::handleKnownCallDerivatives(
return true;
}
eraseIfUnused(call);
return true;
}
auto callval = call.getCalledOperand();

Expand Down Expand Up @@ -4216,7 +4217,11 @@ bool AdjointGenerator::handleKnownCallDerivatives(
}

// TODO HANDLE FREE
llvm::errs() << "freeing without malloc " << *val << "\n";
// Suppress warning for common safe cases (phi nodes, loads) that are
// conservatively handled but can't be statically matched to allocations
if (!isa<PHINode>(val) && !isa<LoadInst>(val)) {
llvm::errs() << "freeing without malloc " << *val << "\n";
}
eraseIfUnused(call, /*erase*/ true, /*check*/ false);
return true;
}
Expand Down
4 changes: 2 additions & 2 deletions enzyme/Enzyme/TypeAnalysis/TypeAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1520,8 +1520,8 @@ void TypeAnalyzer::considerTBAA() {
} else if (call->getType()->isPointerTy()) {
updateAnalysis(call, vdptr.Only(-1, call), call);
} else {
llvm::errs() << " unknown tbaa call instruction user inst: " << I
<< " vdptr: " << vdptr.str() << "\n";
// llvm::errs() << " unknown tbaa call instruction user inst: " << I
// << " vdptr: " << vdptr.str() << "\n";
}
} else if (auto SI = dyn_cast<StoreInst>(&I)) {
auto StoreSize =
Expand Down