-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ir][refactor] Move all frontend stmts to frontend_ir.h
#916
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool! LGTM in general, except for a few nit.
stmt = stmt_tmp.get(); | ||
current_ast_builder().insert(std::move(stmt_tmp)); | ||
} | ||
explicit If(const Expr &cond); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If and While are still in ir.h? Wasn't it about frontend?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! I think these are legacy stuff -- when Taichi was provided in C++14 before integrated in Python3. @yuanming-hu could you confirm?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, they are for the legacy C++14 frontend and should be removed in a future PR.
@@ -1005,4 +1005,34 @@ bool ContinueStmt::as_return() const { | |||
return false; | |||
} | |||
|
|||
If::If(const Expr &cond) { | |||
auto stmt_tmp = std::make_unique<FrontendIfStmt>(cond); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here. So it should be in frontend_ir.cpp?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! LGTM.
OK, let's leave these legacy stuff in Line 161 in 0c3358e
|
This is a follow up of #914 . We move all
Frontend*Stmt
tofrontend_ir.h
. (Expressions will be handled separately)Related issue = #689
[Click here for the format server]