Skip to content

Commit

Permalink
improve tests and errors
Browse files Browse the repository at this point in the history
  • Loading branch information
wsmoses committed Jan 16, 2024
1 parent a7b6d2e commit 2947b9f
Show file tree
Hide file tree
Showing 6 changed files with 227 additions and 324 deletions.
1 change: 0 additions & 1 deletion enzyme/Enzyme/Clang/EnzymeClang.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -631,7 +631,6 @@ struct EnzymeSparseAccumulateAttrInfo : public ParsedAttrInfo {
return AttributeNotApplied;
}
V->setInit(expr);
V->dump();
S.MarkVariableReferenced(loc, V);
S.getASTConsumer().HandleTopLevelDecl(DeclGroupRef(V));
return AttributeApplied;
Expand Down
5 changes: 3 additions & 2 deletions enzyme/Enzyme/FunctionUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7426,8 +7426,9 @@ void fixSparseIndices(llvm::Function &F, llvm::FunctionAnalysisManager &FAM,
}

if (forSparsification.size() == 0) {
llvm::errs() << " found no stores for sparsification\n";
assert(0);
auto context = &F.getEntryBlock().front();
EmitFailure("NoSparsification", context->getDebugLoc(), context, "F: ", F,
"\n Found no stores for sparsification");
return;
}

Expand Down
Loading

0 comments on commit 2947b9f

Please sign in to comment.