Commit 55c0243f by Salem Derisavi Committed by Tianqi Chen

Handle Select in IntSetEvaluator (#2687)

parent 30242d5c
...@@ -531,6 +531,11 @@ class IntSetEvaluator : ...@@ -531,6 +531,11 @@ class IntSetEvaluator :
CHECK(eval_vec_); CHECK(eval_vec_);
return Eval(op->value); return Eval(op->value);
} }
IntSet VisitExpr_(const Select* op, const Expr& e) final {
IntSet true_set = this->Eval(op->true_value);
IntSet false_set = this->Eval(op->false_value);
return Union({false_set, true_set});
}
IntSet VisitExprDefault_(const Node* op, const Expr& e) final { IntSet VisitExprDefault_(const Node* op, const Expr& e) final {
LOG(WARNING) << "cannot evaluate set type " << e->type_key(); LOG(WARNING) << "cannot evaluate set type " << e->type_key();
return IntSet::everything(); return IntSet::everything();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment