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

llvm::Value*s might get corrupted by LLVM optimization passes #3

Open
vivanishin opened this issue Mar 11, 2016 · 0 comments
Open

llvm::Value*s might get corrupted by LLVM optimization passes #3

vivanishin opened this issue Mar 11, 2016 · 0 comments

Comments

@vivanishin
Copy link
Member

Possible bug: llvm::Value* may not be there after optimization passes. But LLVMEnvironment stores a list of llvm::Value*s. One solution is to give all of them unique names, store and lookup by the name or introduce phony usages (and name them and delete later after optimization is done). The problem is similar to that with LLVMChunkBuilder::pointers_, only now we care about more that 2 transformation passes.

Other people must have faced and solved this problem before.

Again, may be it's not even a bug (haven't had issues with this yet). See what LLVM documentation has to say. Although clearly a value can get DCEd, in which case it's totally not a good thing to reference 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