Stream: cranelift

Topic: JIT problems


view this post on Zulip Robin Lindner (Jul 15 2022 at 22:40):

Hey I need your help with my JIT. I just want to generate a code which returns "123 (i32)".

https://gist.github.com/deeprobin/b5113b2481c082c8fbbb45d14e8dbc69

But I get the following backtrace:
thread 'tests::it_works' panicked at 'remove_constant_phis: entry block unknown', C:\Users\robin\.cargo\registry\src\github.com-1ecc6299db9ec823\cranelift-codegen-0.85.1\src\remove_constant_phis.rs:225:10

Can you help me?

GitHub Gist: instantly share code, notes, and snippets.

view this post on Zulip bjorn3 (Jul 16 2022 at 10:56):

you need to call .define_function after you codegened it and called .finalize() on the function builder. you are calling it at the start.


Last updated: Oct 23 2024 at 20:03 UTC