Skip to content

Commit

Permalink
Merge pull request #3776 from halide/srj-gv
Browse files Browse the repository at this point in the history
IRGraphVisitor should increment refcount of visited items
  • Loading branch information
steven-johnson committed Mar 28, 2019
2 parents 1d25a73 + 652b4b3 commit 5b5a2da
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
4 changes: 0 additions & 4 deletions src/CodeGen_C.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,6 @@ class TypeInfoGatherer : public IRGraphVisitor {
include_type(op->type);
if (op->is_intrinsic(Call::lerp)) {
// lower_lerp() can synthesize wider vector types.
// It's not safe to feed temporary Exprs into IRGraphVisitor
// (it tracks the seen values by IRNode*, which could get recycled
// if we are unlucky), so just add widened versions of any
// types present -- it's safe to add types we might not use.
for (auto &a : op->args) {
include_lerp_types(a.type());
}
Expand Down
2 changes: 1 addition & 1 deletion src/IRVisitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class IRGraphVisitor : public IRVisitor {

private:
/** The nodes visited so far */
std::set<const IRNode *> visited;
std::set<IRHandle> visited;

protected:
/** These methods should call 'include' on the children to only
Expand Down

0 comments on commit 5b5a2da

Please sign in to comment.