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] Set has_global_side_effect to false for some statements #898

Merged
merged 5 commits into from
Apr 29, 2020

Conversation

xumingkuan
Copy link
Contributor

@xumingkuan xumingkuan commented Apr 29, 2020

Related issue = #656 (maybe not directly related)

This PR sets has_global_side_effect to false for LoopIndexStmt, GlobalTemporaryStmt, StackAllocaStmt, StackLoadTopStmt, StackLoadTopAdjStmt.

Benchmark:
Before:
benchmark20200428

After (Notice that this also affect the numbers when advanced_optimization = false!):
benchmark20200428_3

[Click here for the format server]

@xumingkuan xumingkuan changed the title [opt] Mark has_global_side_effect to false for some statements [opt] Set has_global_side_effect to false for some statements Apr 29, 2020
@xumingkuan xumingkuan requested a review from yuanming-hu April 29, 2020 01:38
Copy link
Member

@yuanming-hu yuanming-hu left a comment

Choose a reason for hiding this comment

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

Cool! Actually, I think all Stack statements have no global side effects (including those that push/pop). They only work on a local stack. Maybe we mark those as well.

@xumingkuan
Copy link
Contributor Author

Cool! Actually, I think all Stack statements have no global side effects (including those that push/pop). They only work on a local stack. Maybe we mark those as well.

As they are not used as operands, DIE will eliminate them if we mark as no global side effects...

@xumingkuan
Copy link
Contributor Author

xumingkuan commented Apr 29, 2020

BTW why doesn't GitHub give a reasonable diff?

@xumingkuan xumingkuan merged commit b67f4fa into taichi-dev:master Apr 29, 2020
@xumingkuan xumingkuan deleted the side-effect branch May 9, 2020 21:31
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