Use Inkwell to ingest LLVM IR from a file on disk and translate it into the Cairo IR structure. This should use equivalent structures where they exist, and start by stubbing out to no-op polyfills where they do not.
At the end of this task, we should be able to ingest LLVM IR and translate it wholesale to FlatLowered, with little regard for semantic mismatches. In other words, where possible we want this phase to just use the closest possible approximation for an operation.
[ ] Work out whether we want to ingest text-mode LLVM IR or the bitcode.
[ ] Ingest whichever is the case, loading it into Inkwell's definition.
[ ] Determine which portions of LLVM's IR have analogues in FlatLowered.
[ ] Compile each of these directly.
[ ] Set up a basic mechanism to stub out to polyfill implementations by name, returning a descriptive "not implemented" error to start with.
[ ] Set up a framework for semantic equivalence tests between Rust and our execution model, if possible. This may depend on being able to get some data in and some data out, but should work on byte patterns rather than higher-level data types.
[ ] Use this to create some basic (should work now) tests for the emission and lowering phase.
Description
Use Inkwell to ingest LLVM IR from a file on disk and translate it into the Cairo IR structure. This should use equivalent structures where they exist, and start by stubbing out to no-op polyfills where they do not.
At the end of this task, we should be able to ingest LLVM IR and translate it wholesale to
FlatLowered
, with little regard for semantic mismatches. In other words, where possible we want this phase to just use the closest possible approximation for an operation.