mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-02 15:32:06 +00:00
ed22bdc18f
deduplicate constant evaluation in cranelift backend The cranelift backend had two matches on `ConstantKind`, which can be avoided, and used this `eval_for_mir` that nothing else uses... this makes things more consistent with the (better-tested) LLVM backend. I noticed this because cranelift was the only user of `eval_for_mir`. However `try_eval_for_mir` still has one other user in `eval`... the odd thing is that the interpreter has its own `eval_mir_constant` which seems to duplicate the same functionality and does not use `try_eval_for_mir`. No idea what is happening here. r? ``@bjorn3`` Cc ``@lcnr`` |
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |
Please read the rustc-dev-guide chapter on Backend Agnostic Codegen.