Linker Optimization Pass clean-up (#153)

This commit is contained in:
Edward Chen
2023-03-15 15:21:19 -04:00
committed by GitHub
parent 06a34c8cc5
commit a49e03abfb
3 changed files with 3 additions and 16 deletions

View File

@@ -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();

View File

@@ -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,

View File

@@ -3,7 +3,7 @@
//! A compiler infrastructure for compiling programs to circuits
#![warn(missing_docs)]
// #![deny(warnings)]
#![deny(warnings)]
#[macro_use]
pub mod ir;