This commit is contained in:
Jakub Doka 2024-10-26 00:37:39 +02:00
parent 8016b1fad5
commit 2fc24f0f58
No known key found for this signature in database
GPG key ID: C6E9A89936B8C143

View file

@ -28,7 +28,6 @@ use {
hashbrown::hash_map, hashbrown::hash_map,
hbbytecode::DisasmError, hbbytecode::DisasmError,
regalloc2::VReg, regalloc2::VReg,
std::panic,
}; };
const VOID: Nid = 0; const VOID: Nid = 0;
@ -4090,9 +4089,6 @@ impl<'a> Function<'a> {
buf.push(o); buf.push(o);
while let Some(&n) = buf.get(cursor) { while let Some(&n) = buf.get(cursor) {
for &i in &self.nodes[n].inputs[1..] { for &i in &self.nodes[n].inputs[1..] {
if self.nodes[i].inputs.is_empty() {
std::println!("{:?}", self.nodes[i]);
}
if self.nodes[n].inputs.first() == self.nodes[i].inputs.first() if self.nodes[n].inputs.first() == self.nodes[i].inputs.first()
&& self.nodes[i].outputs.iter().all(|&o| { && self.nodes[i].outputs.iter().all(|&o| {
self.nodes[o].inputs.first() != self.nodes[i].inputs.first() self.nodes[o].inputs.first() != self.nodes[i].inputs.first()
@ -4115,9 +4111,6 @@ impl<'a> Function<'a> {
buf.push(o); buf.push(o);
while let Some(&n) = buf.get(cursor) { while let Some(&n) = buf.get(cursor) {
for &i in &self.nodes[n].inputs[1..] { for &i in &self.nodes[n].inputs[1..] {
if self.nodes[i].inputs.is_empty() {
std::println!("{:?}", self.nodes[i]);
}
if self.nodes[n].inputs.first() == self.nodes[i].inputs.first() if self.nodes[n].inputs.first() == self.nodes[i].inputs.first()
&& self.nodes[i].outputs.iter().all(|&o| { && self.nodes[i].outputs.iter().all(|&o| {
self.nodes[o].inputs.first() != self.nodes[i].inputs.first() self.nodes[o].inputs.first() != self.nodes[i].inputs.first()
@ -4134,8 +4127,6 @@ impl<'a> Function<'a> {
debug_assert!(outputs.len() == buf.len() || outputs.len() == buf.len() + 1,); debug_assert!(outputs.len() == buf.len() || outputs.len() == buf.len() + 1,);
std::println!("{:?}\n{:?}", outputs, buf);
if buf.len() + 1 == outputs.len() { if buf.len() + 1 == outputs.len() {
outputs.remove(outputs.len() - 1); outputs.remove(outputs.len() - 1);
} }