You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2021/11/23 23:56:46 UTC

[GitHub] [tvm] jroesch commented on a change in pull request #9569: [Relay] WithFields method for Call, Function, Var, TupleGetItem, If, Let, RefCreate, RefRead, RefWrite, Match, and Clause

jroesch commented on a change in pull request #9569:
URL: https://github.com/apache/tvm/pull/9569#discussion_r755595367



##########
File path: src/relay/ir/expr_functor.cc
##########
@@ -512,9 +464,9 @@ class ExprBinder : public MixedModeMutator, PatternMutator {
 
   Pattern VisitPattern(const Pattern& p) final { return PatternMutator::VisitPattern(p); }
 
-  Clause VisitClause(const Clause& c) final {
-    Pattern pat = VisitPattern(c->lhs);
-    return Clause(pat, VisitExpr(c->rhs));
+  Clause VisitClause(const Clause& clause) final {
+    Pattern lhs = VisitPattern(clause->lhs);
+    return WithFields(std::move(clause), std::move(lhs), VisitExpr(clause->rhs));

Review comment:
       @mbs-octoml I don't know if we actually need these moves, for const reference does this matter? I can't actually remember what the spec says about value vs move semantics for const &.




-- 
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: commits-unsubscribe@tvm.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org