mirror of
https://github.com/circify/circ.git
synced 2026-01-10 22:27:55 -05:00
Linker Optimization Pass clean-up (#153)
This commit is contained in:
@@ -876,6 +876,7 @@ impl CGen {
|
||||
}
|
||||
let ret_sort = Sort::Tuple(ret_sorts.into());
|
||||
|
||||
// Create ordered list of arguments based on argument names
|
||||
let metadata = self.circ_metadata();
|
||||
let arg_names = metadata.ordered_input_names();
|
||||
let mut args_map: FxHashMap<String, Term> = FxHashMap::default();
|
||||
|
||||
@@ -17,9 +17,8 @@ struct Linker<'f> {
|
||||
///
|
||||
/// ## Arguments
|
||||
///
|
||||
/// * `arg_names`: the argument names, in order
|
||||
/// * `arg_values`: the argument values, in the same order
|
||||
/// * `callee`: the called function
|
||||
/// * `arg_values`: the argument values, in the same order
|
||||
///
|
||||
/// ## Returns
|
||||
///
|
||||
@@ -35,19 +34,6 @@ pub fn link_one(callee: &Computation, values: Vec<Term>) -> Term {
|
||||
for (name, value) in names.into_iter().zip(values) {
|
||||
let sort = callee.metadata.input_sort(&name).clone();
|
||||
substitution_map.insert(leaf_term(Op::Var(name, sort)), value);
|
||||
// let ssa_names = callee.metadata.input_ssa_name_from_nice_name(n);
|
||||
// if ssa_names.len() == 1 {
|
||||
// let s = callee.metadata.input_sort(&ssa_names[0].0).clone();
|
||||
// substitution_map.insert(leaf_term(Op::Var(ssa_names[0].0.clone(), s)), v);
|
||||
// } else {
|
||||
// for (s_name, index) in ssa_names {
|
||||
// let s = callee.metadata.input_sort(&s_name).clone();
|
||||
// substitution_map.insert(
|
||||
// leaf_term(Op::Var(s_name, s)),
|
||||
// term![Op::Select; v.clone(), bv_lit(index, 32)],
|
||||
// );
|
||||
// }
|
||||
// }
|
||||
}
|
||||
term(
|
||||
Op::Tuple,
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
//! A compiler infrastructure for compiling programs to circuits
|
||||
|
||||
#![warn(missing_docs)]
|
||||
// #![deny(warnings)]
|
||||
#![deny(warnings)]
|
||||
|
||||
#[macro_use]
|
||||
pub mod ir;
|
||||
|
||||
Reference in New Issue
Block a user