Skip to content
Snippets Groups Projects
Commit ef164c45 authored by Aaron Councilman's avatar Aaron Councilman
Browse files

Fix juno call code-gen

parent bf65041d
No related branches found
No related tags found
1 merge request!46Fix juno call code-gen
......@@ -490,23 +490,27 @@ impl CodeGenerator<'_> {
}
// Create the call expression, a region specifically for it, and a region after that.
let mut call_region = self.builder.allocate_node(func_id);
let mut after_call_region = self.builder.allocate_node(func_id);
let mut call_region = ssa.create_block(&mut self.builder);
ssa.add_pred(call_region, block);
ssa.seal_block(call_region, &mut self.builder);
let mut after_call_region = ssa.create_block(&mut self.builder);
ssa.add_pred(after_call_region, call_region);
ssa.seal_block(after_call_region, &mut self.builder);
let mut call = self.builder.allocate_node(func_id);
let call_id = call.id();
call_region.build_region(Box::new([block]));
after_call_region.build_region(Box::new([call_region.id()]));
block = after_call_region.id();
call.build_call(
call_region.id(),
call_region,
call_func,
dynamic_constants.into(),
arg_vals.into(),
);
let _ = self.builder.add_node(call_region);
let _ = self.builder.add_node(after_call_region);
let _ = self.builder.add_node(call);
block = after_call_region;
// Read each of the "inout values" and perform the SSA update
let inouts_index = self.builder.create_field_index(1);
for (idx, var) in inouts.into_iter().enumerate() {
......
......@@ -61,9 +61,6 @@ fn main() {
if args.verify || args.verify_all {
pm.add_pass(hercules_opt::pass::Pass::Verify);
}
if args.x_dot {
pm.add_pass(hercules_opt::pass::Pass::Xdot(true));
}
add_verified_pass!(pm, args, PhiElim);
if args.x_dot {
pm.add_pass(hercules_opt::pass::Pass::Xdot(true));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment