Skip to content
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] Replace FuncCallExpression with FrontendFuncCallStmt #7027

Merged
merged 13 commits into from
Jan 6, 2023

Conversation

lin-hitonami
Copy link
Contributor

@lin-hitonami lin-hitonami commented Jan 3, 2023

Stack from ghstack (oldest at bottom):

issue: #6983
FuncCall is not just an expression. It executes code and returns the result. It should be more like FrontendAllocaStmt rather than being FuncCallExpression. If it is an expression, the IR printer handles it like an expression and prints the detail of the func call everywhere its return value is used. If it is a statement, it will only be printed once, and other statements/expressions reference its return value by its statement number.

lin-hitonami added a commit that referenced this pull request Jan 3, 2023
ghstack-source-id: 72724be4ea0a81c0626af0e5f2b44c69fceab207
Pull Request resolved: #7027
FuncCall is not just an expression. It executes code and returns the result. It should be more like FrontendAllocaStmt rather than being FuncCallExpression. If it is an expression, the IR printer handles it like an expression and prints the detail of the func call everywhere its return value is used. If it is a statement, it will only be printed once, and other statements/expressions reference its return value by its statement number.

[ghstack-poisoned]
lin-hitonami added a commit that referenced this pull request Jan 3, 2023
ghstack-source-id: 84875d59668f6dfbd5a53fd15da2c3022ae3a149
Pull Request resolved: #7027
FuncCall is not just an expression. It executes code and returns the result. It should be more like FrontendAllocaStmt rather than being FuncCallExpression. If it is an expression, the IR printer handles it like an expression and prints the detail of the func call everywhere its return value is used. If it is a statement, it will only be printed once, and other statements/expressions reference its return value by its statement number.

[ghstack-poisoned]
lin-hitonami added a commit that referenced this pull request Jan 3, 2023
ghstack-source-id: eb47590decf5fe65d1d35950426594e370805716
Pull Request resolved: #7027
taichi/ir/frontend_ir.cpp Outdated Show resolved Hide resolved
FuncCall is not just an expression. It executes code and returns the result. It should be more like FrontendAllocaStmt rather than being FuncCallExpression. If it is an expression, the IR printer handles it like an expression and prints the detail of the func call everywhere its return value is used. If it is a statement, it will only be printed once, and other statements/expressions reference its return value by its statement number.

[ghstack-poisoned]
lin-hitonami added a commit that referenced this pull request Jan 4, 2023
ghstack-source-id: d1591f62a4274b6b3eaaafda4267b88329c917c8
Pull Request resolved: #7027
FuncCall is not just an expression. It executes code and returns the result. It should be more like FrontendAllocaStmt rather than being FuncCallExpression. If it is an expression, the IR printer handles it like an expression and prints the detail of the func call everywhere its return value is used. If it is a statement, it will only be printed once, and other statements/expressions reference its return value by its statement number.

[ghstack-poisoned]
lin-hitonami added a commit that referenced this pull request Jan 4, 2023
ghstack-source-id: 9358cce6498ce824ccfd9e8363327dcb5a341b91
Pull Request resolved: #7027
@lin-hitonami lin-hitonami requested a review from bobcao3 January 4, 2023 04:26
pre-commit-ci bot and others added 2 commits January 4, 2023 04:26
FuncCall is not just an expression. It executes code and returns the result. It should be more like FrontendAllocaStmt rather than being FuncCallExpression. If it is an expression, the IR printer handles it like an expression and prints the detail of the func call everywhere its return value is used. If it is a statement, it will only be printed once, and other statements/expressions reference its return value by its statement number.

[ghstack-poisoned]
lin-hitonami added a commit that referenced this pull request Jan 4, 2023
ghstack-source-id: 600fb6de8582f81546d888374820d13929ceeb11
Pull Request resolved: #7027
FuncCall is not just an expression. It executes code and returns the result. It should be more like FrontendAllocaStmt rather than being FuncCallExpression. If it is an expression, the IR printer handles it like an expression and prints the detail of the func call everywhere its return value is used. If it is a statement, it will only be printed once, and other statements/expressions reference its return value by its statement number.

[ghstack-poisoned]
lin-hitonami added a commit that referenced this pull request Jan 4, 2023
ghstack-source-id: 8631eb78a57bf4beddbbd026faf27579e282675d
Pull Request resolved: #7027
FuncCall is not just an expression. It executes code and returns the result. It should be more like FrontendAllocaStmt rather than being FuncCallExpression. If it is an expression, the IR printer handles it like an expression and prints the detail of the func call everywhere its return value is used. If it is a statement, it will only be printed once, and other statements/expressions reference its return value by its statement number.

[ghstack-poisoned]
lin-hitonami added a commit that referenced this pull request Jan 5, 2023
ghstack-source-id: a030a0b4fcba4c60337e8c80e586a2526187e8d2
Pull Request resolved: #7027
FuncCall is not just an expression. It executes code and returns the result. It should be more like FrontendAllocaStmt rather than being FuncCallExpression. If it is an expression, the IR printer handles it like an expression and prints the detail of the func call everywhere its return value is used. If it is a statement, it will only be printed once, and other statements/expressions reference its return value by its statement number.

[ghstack-poisoned]
lin-hitonami added a commit that referenced this pull request Jan 5, 2023
ghstack-source-id: da0bfef346214d258ef00f52339d370ae0f95ae1
Pull Request resolved: #7027
FuncCall is not just an expression. It executes code and returns the result. It should be more like FrontendAllocaStmt rather than being FuncCallExpression. If it is an expression, the IR printer handles it like an expression and prints the detail of the func call everywhere its return value is used. If it is a statement, it will only be printed once, and other statements/expressions reference its return value by its statement number.

[ghstack-poisoned]
issue: #6983
FuncCall is not just an expression. It executes code and returns the result. It should be more like FrontendAllocaStmt rather than being FuncCallExpression. If it is an expression, the IR printer handles it like an expression and prints the detail of the func call everywhere its return value is used. If it is a statement, it will only be printed once, and other statements/expressions reference its return value by its statement number.

[ghstack-poisoned]
Copy link
Collaborator

@bobcao3 bobcao3 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

issue: #6983
FuncCall is not just an expression. It executes code and returns the result. It should be more like FrontendAllocaStmt rather than being FuncCallExpression. If it is an expression, the IR printer handles it like an expression and prints the detail of the func call everywhere its return value is used. If it is a statement, it will only be printed once, and other statements/expressions reference its return value by its statement number.

[ghstack-poisoned]
@lin-hitonami lin-hitonami merged commit 52979fd into gh/lin-hitonami/2/base Jan 6, 2023
lin-hitonami added a commit that referenced this pull request Jan 6, 2023
ghstack-source-id: 7ccf3062f461ad642aa03b61879060b86e37df18
Pull Request resolved: #7027
@lin-hitonami lin-hitonami deleted the gh/lin-hitonami/2/head branch January 6, 2023 09:50
quadpixels pushed a commit to quadpixels/taichi that referenced this pull request May 13, 2023
ghstack-source-id: 7ccf3062f461ad642aa03b61879060b86e37df18
Pull Request resolved: taichi-dev#7027
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants