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

[opt] Properly handle FuncCallStmt in CFG and simplify passes #8139

Merged
merged 4 commits into from
Jun 6, 2023

Conversation

lin-hitonami
Copy link
Contributor

@lin-hitonami lin-hitonami commented Jun 5, 2023

Issue: #602

Assuming FuncCallStmt can load or modify any address. I will write a pass to find out all the addresses loaded and modified in a FuncCallStmt later.

🤖 Generated by Copilot at cf4766c

Summary

📞🔧🧪

This pull request enhances the control flow graph analysis and optimization to support function calls in taichi kernels. It also improves the simplification of basic blocks and tests some experimental features of taichi. The main files affected are taichi/ir/control_flow_graph.cpp, taichi/transforms/simplify.cpp, and tests/python/test_function.py.

We unleash the power of function calls
We optimize the control flow graph
We test the limits of taichi's core
We simplify the basic blocks of wrath

Walkthrough

  • Add support for function calls in control flow graph analysis and optimization (link, link)
  • Prevent simplifying function call statements that may have side effects or modify global variables (link, link)
  • Test the experimental template feature that allows passing arguments to functions as template parameters (link, link)
  • Test the support for assertions inside kernels (link, link, link)
  • Remove a redundant check for function call statements in BasicBlockSimplify (link)
  • Remove a comment that is no longer relevant in test_function.py (link)

@netlify
Copy link

netlify bot commented Jun 5, 2023

Deploy Preview for docsite-preview canceled.

Name Link
🔨 Latest commit cf4766c
🔍 Latest deploy log https://app.netlify.com/sites/docsite-preview/deploys/647db8d44c14620008207e7d

@lin-hitonami lin-hitonami merged commit ee22965 into taichi-dev:master Jun 6, 2023
@lin-hitonami lin-hitonami deleted the fix-ref branch June 6, 2023 06:55
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