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

Transform conv test

parent d4280e53
No related branches found
No related tags found
1 merge request!198Optimization for miranda
Pipeline #201840 passed
......@@ -695,7 +695,8 @@ pub fn fork_coalesce_helper(
editor.edit(|mut edit| {
let new_tid = edit.add_node(new_tid);
let edit = edit.replace_all_uses(tid, new_tid)?;
let mut edit = edit.replace_all_uses(tid, new_tid)?;
edit.sub_edit(tid, new_tid);
Ok(edit)
});
}
......@@ -1598,3 +1599,8 @@ pub fn clean_monoid_reduces(editor: &mut FunctionEditor, typing: &Vec<TypeID>) {
}
}
}
/*
* Looks for reads in fork-joins that are linear in the thread IDs for the fork-
* join.
*/
......@@ -124,7 +124,8 @@ fn test8(input : i32) -> i32[8] {
}
#[entry]
fn test9<r, c, z : usize>(input : i32[r, c]) -> i32[r, c] {
fn test9<r, c : usize>(input : i32[r, c]) -> i32[r, c] {
const z = 3;
const rad = z / 2;
@const let out : i32[r, c];
......
......@@ -73,6 +73,24 @@ dce(auto.test8);
simplify-cfg(auto.test8);
dce(auto.test8);
fork-split(auto.test9@filter_loop);
fork-unroll(auto.test9);
fork-unroll(auto.test9);
dce(auto.test9);
ccp(auto.test9);
gvn(auto.test9);
phi-elim(auto.test9);
dce(auto.test9);
fixpoint {
predication(auto.test9);
simplify-cfg(auto.test9);
}
ccp(auto.test9);
gvn(auto.test9);
phi-elim(auto.test9);
lift-dc-math(auto.test9);
dce(auto.test9);
ip-sroa(*);
sroa(*);
dce(*);
......@@ -80,7 +98,7 @@ ccp(*);
gvn(*);
phi-elim(*);
dce(*);
gcm(*);
gcm(*);
float-collections(test2, auto.test2, test4, auto.test4, test5, auto.test5);
gcm(*);
......@@ -61,7 +61,7 @@ fn main() {
let mut r = runner!(test9);
let input = vec![1, 2, 3, 4, 5, 6, 7, 8, 9];
let input = HerculesImmBox::from(&input as &[i32]);
let output = r.run(3, 3, 3, input.to()).await;
let output = r.run(3, 3, input.to()).await;
let correct = vec![
1 + 2 + 4 + 5,
1 + 2 + 3 + 4 + 5 + 6,
......
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