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

work on bfs

parent 3b1aa5d4
No related branches found
No related tags found
2 merge requests!215Large benches,!214More optimizations
Pipeline #202013 failed
This commit is part of merge request !215. Comments created here will be created in the context of that merge request.
......@@ -44,11 +44,12 @@ fn bfs<n, m: usize>(graph_nodes: Node[n], source: u32, edges: u32[m]) -> i32[n]
@loop2 for i in 0..n {
stop = stop && !updated[i];
if updated[i] {
mask[i] = true;
visited[i] = true;
updated[i] = false;
}
}
@loop3 for i in 0..n {
mask[i] = mask[i] || updated[i];
visited[i] = visited[i] || updated[i];
updated[i] = false;
}
}
......
......@@ -11,9 +11,9 @@ macro simpl!(X) {
phi-elim(bfs);
no-memset(bfs@cost);
let init = outline(bfs@cost_init);
let loop1 = outline(bfs@loop1);
let loop2 = outline(bfs@loop2);
parallel-reduce(loop1);
let traverse = outline(bfs@loop1);
let collect = outline(bfs@loop2 | bfs@loop3);
parallel-reduce(traverse);
simpl!(*);
predication(*);
......@@ -27,13 +27,15 @@ fixpoint {
simpl!(*);
predication(*);
simpl!(*);
reduce-slf(*);
simpl!(*);
fork-tile[32, 0, false, false](loop1);
let split = fork-split(loop1);
let out = outline(split.bfs_1.fj1);
unforkify(out);
inline(bfs@loop1);
delete-uncalled(*);
fixpoint {
forkify(collect);
fork-guard-elim(collect);
}
fork-fusion(collect);
simpl!(collect);
unforkify(init);
unforkify(init, traverse, collect);
gcm(*);
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