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

Move stack object slot back to local block where it is used #24

Open
0x7CFE opened this issue Sep 20, 2013 · 1 comment
Open

Move stack object slot back to local block where it is used #24

0x7CFE opened this issue Sep 20, 2013 · 1 comment

Comments

@0x7CFE
Copy link
Owner

0x7CFE commented Sep 20, 2013

Currently object slots are created in the preamble basic block. This is not effective and consumes stack space for all potential objects in all possible branches.

Object slot should be moved back to the origin basic block and it's holder should be updated accordingly: when control flow reaches end of the origin basic block, object holder should be nulled.

This may be achieved using llvm.lifetime.x intrinsics.

P.S.: Object slot was moved to a preamble in commit 1f26550

@0x7CFE
Copy link
Owner Author

0x7CFE commented Oct 7, 2013

Previously commit 1f26550 fixed the crash by moving the alloca from local basic block to the preamble.

Actually, crash may be triggered by access to a disposed alloca memory referenced throgh gc-root by GC.
This may happen if gc-roots are not cleared when leaving the local basic block. We need to check it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant