Suppose we have:
Expr Mutate_(const Call* op, const Expr& e) final{
return IRMutator::Mutate_(op, e);
}
This is a special call, like an intrinsic for a target, and we need insert a attrStmt before this call for some reason,
is there any handy function in tvm/halide to do that?
You need to build a mutator that insert AttrStmt that wraps the statement containing that call. Since call itself is not a statement, the best way I can think of is to set a flag after you see the call, and overload Mutate(const Stmt &op) to wrap AttrStmt when you see the flag in post order