I take a look at the function StmtSimplifier::VisitStmt_ in simplify.cc, it don’t use an api similar to getUser in llvm to get the user op of store op. so my question: Is there similar api in tvm to get the def-use chain ?
// eliminate useless stores
Stmt StmtSimplifier::VisitStmt_(const StoreNode* op) {
Stmt stmt = Parent::VisitStmt_(op);
op = stmt.as<StoreNode>();
if (const LoadNode* load = op->value.as<LoadNode>()) {
if (load->buffer_var.same_as(op->buffer_var) && ExprDeepEqual()(load->index, op->index)) {
return Evaluate(0);
}
}
return GetRef<Stmt>(op);
}