Skip to content
Snippets Groups Projects
Commit 69c17603 authored by rarbore2's avatar rarbore2
Browse files

Merge branch 'fix_gvn' into 'main'

Fix GVN

See merge request !66
parents fc9723cf acbfe65b
No related branches found
No related tags found
1 merge request!66Fix GVN
Pipeline #200379 passed
......@@ -17,6 +17,11 @@ pub fn gvn(editor: &mut FunctionEditor) {
let mut value_numbers: HashMap<Node, NodeID> = HashMap::new();
while let Some(work) = worklist.pop() {
// Deleted nodes (and technically the original start) should be skipped.
if editor.func().nodes[work.idx()].is_start() {
continue;
}
// First, simplify the work node by unwrapping identity functions.
let value = crawl_identities(work, editor);
......
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