(&self)
| 1069 | |
| 1070 | #[cfg(debug_assertions)] |
| 1071 | fn check_post_egraph(&self) { |
| 1072 | // Verify that no union nodes are reachable from inst args, |
| 1073 | // and that all inst args' defining instructions are in the |
| 1074 | // layout. |
| 1075 | for block in self.func.layout.blocks() { |
| 1076 | for inst in self.func.layout.block_insts(block) { |
| 1077 | self.func |
| 1078 | .dfg |
| 1079 | .inst_values(inst) |
| 1080 | .for_each(|arg| match self.func.dfg.value_def(arg) { |
| 1081 | ValueDef::Result(i, _) => { |
| 1082 | debug_assert!(self.func.layout.inst_block(i).is_some()); |
| 1083 | } |
| 1084 | ValueDef::Union(..) => { |
| 1085 | panic!("egraph union node {arg} still reachable at {inst}!"); |
| 1086 | } |
| 1087 | _ => {} |
| 1088 | }) |
| 1089 | } |
| 1090 | } |
| 1091 | } |
| 1092 | |
| 1093 | #[cfg(not(debug_assertions))] |
| 1094 | fn check_post_egraph(&self) {} |
no test coverage detected