Skip to content
Snippets Groups Projects
Commit 263b2e0c authored by Russel Arbore's avatar Russel Arbore
Browse files

whoops

parent ff03fe68
No related branches found
No related tags found
1 merge request!208IP SROA Parameters
Pipeline #201953 failed
This commit is part of merge request !208. Comments created here will be created in the context of that merge request.
use std::collections::HashMap;
use std::iter::zip;
use hercules_ir::ir::*;
use crate::*;
......@@ -51,24 +48,24 @@ pub fn interprocedural_sroa(
let mut old_return_type_map = vec![];
let mut changed = false;
for ret_typ in param_types.iter() {
if !can_sroa_type(editor, *ret_typ) {
for par_typ in param_types.iter() {
if !can_sroa_type(editor, *par_typ) {
old_param_type_map.push(IndexTree::Leaf(new_param_types.len()));
new_param_types.push(*ret_typ);
new_param_types.push(*par_typ);
} else {
let (types, index) = sroa_type(editor, *ret_typ, new_param_types.len());
let (types, index) = sroa_type(editor, *par_typ, new_param_types.len());
old_param_type_map.push(index);
new_param_types.extend(types);
changed = true;
}
}
for par_typ in return_types.iter() {
if !can_sroa_type(editor, *par_typ) {
for ret_typ in return_types.iter() {
if !can_sroa_type(editor, *ret_typ) {
old_return_type_map.push(IndexTree::Leaf(new_return_types.len()));
new_return_types.push(*par_typ);
new_return_types.push(*ret_typ);
} else {
let (types, index) = sroa_type(editor, *par_typ, new_return_types.len());
let (types, index) = sroa_type(editor, *ret_typ, new_return_types.len());
old_return_type_map.push(index);
new_return_types.extend(types);
changed = 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