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] [bug] Make control-flow graph take function call into account #2448

Merged
merged 5 commits into from
Jun 22, 2021

Conversation

xumingkuan
Copy link
Contributor

Related issue = #2193; fix #2442

This PR mainly adds void visit(FuncCallStmt *stmt) override to CFGBuilder. It also adds struct CFGFuncKey: note that the behavior of an inlined function is different when it's parallel executed or not (if not, a top-level range-for in the function will be parallel; otherwise it will be serial).

@xumingkuan xumingkuan requested a review from k-ye June 22, 2021 05:31
Copy link
Member

@k-ye k-ye left a comment

Choose a reason for hiding this comment

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

Great! LGTM + nits

tests/python/test_function.py Show resolved Hide resolved
@xumingkuan
Copy link
Contributor Author

Just confirmed that the modified test does fail on the master branch.

@xumingkuan xumingkuan merged commit 32732ac into taichi-dev:master Jun 22, 2021
@Leonz5288 Leonz5288 mentioned this pull request Jun 24, 2021
@xumingkuan xumingkuan deleted the test-func branch June 29, 2021 06:01
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.

Simplification pass does not take function call into account
2 participants