-
Notifications
You must be signed in to change notification settings - Fork 9
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 Emitter: lam == entry_ || lam->is_basicblock() #108
Comments
The error especially also occurs/disappears in a version without |
In the end of the day it's duplicate of #9. If we end up with code that doesn't consist of top-level functions containing basic blocks, the LLVM backend cannot emit code - hence the assertion. In this particular instance, the code generated by |
So I guess, what I'm trying to say here is, that the real bug lies within |
The assertion
lam == entry_ || lam->is_basicblock()
is thrown at unexpected points.An example can be found here (LamSpec needs to be disabled from the optimizations to be able to run the code generation):
https://github.com/NeuralCoder3/thorin2/blob/c4326c6643b9e26777d0d7bd9b2f5dfc5ce1e885/enzyme/brussel.thorin
The problem instance in the linked file is caused when the
brusselator_2d_loop
function is external (otherwise it is completely deleted) and callsbrusselator_f
.The body of
brusselator_f
seems to be irrelevant. But the error only occurs whenbrusselator_f
is.extern
.Note: The error is also caused in other circumstances where
brusselator_f
is not marked with.extern
but has a more complex body.The text was updated successfully, but these errors were encountered: