Lunderberg commented on code in PR #15954:
URL: https://github.com/apache/tvm/pull/15954#discussion_r1426900240


##########
src/ir/transform.cc:
##########
@@ -531,6 +531,23 @@ Pass CreateModulePass(const 
runtime::TypedPackedFunc<IRModule(IRModule, PassCont
   return ModulePass(pass_func, pass_info);
 }
 
+Pass ApplyPassToFunction(Pass pass, String func_name, bool 
error_if_function_missing) {

Review Comment:
   As a third option, what if the `func_name` parameter is replaced with a 
`func_name_regex` parameter?  That way, it could handle the cases of a single 
function and of a list of functions, and could clearly state when an error 
occurs by renaming the parameter to `error_if_no_function_matches_regex`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to