-
Notifications
You must be signed in to change notification settings - Fork 47
Description
Cairo Native currently maintains BlockExt
as an extension for mlir's Block
. This trait holds a bunch of methods which help us reduce the amount of code we need to write in order to build the mlir operations. Here is were it is currently located: https://github.com/lambdaclass/cairo_native/blob/main/src/utils/block_ext.rs
However the same trait has been added to melior crate:
- For llvm ops: https://github.com/mlir-rs/melior/blob/main/melior/src/helpers/llvm.rs
- For arith ops: https://github.com/mlir-rs/melior/blob/main/melior/src/helpers/arith.rs
- For getting block arguments and appending results: https://github.com/mlir-rs/melior/blob/main/melior/src/helpers/builtin.rs
This means we are unnecessarily maintaining code, since both traits don't differ in their implementation at all. Not only this but it also may generate some annoying issues while implementing libfuncs. Since there are two versions of the same trait, one could run into some incompatibilities when importing these methods.
We should try removing the the cairo_native's implementation and stick with melior's.