Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove unnecessary logging in release and remove forgotten debug prints #38

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion circuit_passes/src/bucket_interpreter/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ impl<'a> Env<'a> {
interpreter: &BucketInterpreter,
args: Vec<Value>,
observe: bool) -> Value {
println!("Running {}", name);
if cfg!(debug_assertions) { println!("Running {}", name); }
let code = &self.functions_library[name].body;
let mut function_env = Env::new(self.templates_library, self.functions_library, self.context_switcher);
for (id, arg) in args.iter().enumerate() {
Expand Down
4 changes: 2 additions & 2 deletions circuit_passes/src/bucket_interpreter/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -496,12 +496,12 @@ impl<'a> BucketInterpreter<'a> {
(None, None, env)
}
Some(true) => {
println!("Running then branch");
if cfg!(debug_assertions) { println!("Running then branch"); }
let (ret, env) = self.execute_instructions(&true_branch, env, observe);
(ret, Some(true), env)
}
Some(false) => {
println!("Running else branch");
if cfg!(debug_assertions) { println!("Running else branch"); }
let (ret, env) = self.execute_instructions(&false_branch, env, observe);
(ret, Some(false), env)
}
Expand Down
3 changes: 0 additions & 3 deletions circuit_passes/src/passes/conditional_flattening.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ impl InterpreterObserver for ConditionalFlattening {
}

fn on_store_bucket(&self, bucket: &StoreBucket, env: &Env) -> bool {
println!("Before env: {}", env);
println!("on_store_bucket: {}", bucket.to_sexp().to_pretty(200));
true
}

Expand All @@ -65,7 +63,6 @@ impl InterpreterObserver for ConditionalFlattening {
}

fn on_block_bucket(&self, bucket: &BlockBucket, _env: &Env) -> bool {
println!("on_block_bucket({}): n_iters = {}", bucket.id, bucket.n_iters);
true
}

Expand Down
2 changes: 1 addition & 1 deletion circuit_passes/src/passes/loop_unroll.rs
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ mod test {
circuit.llvm_data.signal_index_mapping.insert("test_0".to_string(), HashMap::new());
circuit.llvm_data.component_index_mapping.insert("test_0".to_string(), HashMap::new());
let new_circuit = pass.transform_circuit(&circuit);
println!("{}", new_circuit.templates[0].body.last().unwrap().to_string());
if cfg!(debug_assertions) { println!("{}", new_circuit.templates[0].body.last().unwrap().to_string()); }
assert_ne!(circuit, new_circuit);
match new_circuit.templates[0].body.last().unwrap().as_ref() {
Instruction::Block(b) => assert_eq!(b.body.len(), 10), // 5 iterations unrolled times 2 statements in the loop body
Expand Down
2 changes: 1 addition & 1 deletion circuit_passes/src/passes/memory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ impl PassMemory {

pub fn run_template(&self, observer: &dyn InterpreterObserver, template: &TemplateCode) {
assert!(!self.current_scope.is_empty());
println!("Running {}", self.current_scope);
if cfg!(debug_assertions) { println!("Running {}", self.current_scope); }
let interpreter = self.build_interpreter(observer);
let env = Env::new(&self.templates_library, &self.functions_library, self);
interpreter.execute_instructions(&template.body, env, true);
Expand Down
3 changes: 1 addition & 2 deletions compiler/src/intermediate_representation/log_bucket.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,7 @@ impl UpdateId for LogBucket {
impl WriteLLVMIR for LogBucket {
fn produce_llvm_ir<'a, 'b>(&self, producer: &'b dyn LLVMIRProducer<'a>) -> Option<LLVMInstruction<'a>> {
Self::manage_debug_loc_from_curr(producer, self);

todo!()
None // Ignore this statements
}
}

Expand Down
Loading