Why SimplifyInference use CreateFunctionPass to create Pass

hello,gays. I read the tvm pass code, but i so confuse, the SimplifyInferencePass use the {MixedModeMutator} to rewrite graph expr{node}, and return a expr. The {FunctionPassNode::operator()} loop the graph node , do pass for every node of graph. and restore the id:new_expr to update graph. this pass{SimplifyInference}, add new nodes to graph and dependents input to connect to old graph but only return one expr. The {FunctionPassNode} only update one node to graph. So this Pass{SimplifyInference} maybe not update all node to IRModule. Please help me to explain. Did I get it wrong?

Thanks for asking! If I understand correctly, CreateFunctionPass creates a pass that applies to every single Relay function in an IRModule, which means it won’t miss any Function there

yes,you are right. but SimplifyInferencePass ,this pass add some new node to the graph. but CreateFunctionPass just update one node of raw IRModule.