File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5141,11 +5141,15 @@ impl Function {
51415141 let mut num_in_edges = vec ! [ 0 ; self . blocks. len( ) ] ;
51425142 for block in self . rpo ( ) {
51435143 for & insn in & self . blocks [ block. 0 ] . insns {
5144- match self . find ( insn) {
5145- Insn :: IfTrue { target, .. } | Insn :: IfFalse { target, .. } | Insn :: Jump ( target) => {
5146- num_in_edges[ target. target . 0 ] += 1 ;
5144+ // Instructions without output, including branch instructions, can't be targets of
5145+ // make_equal_to, so we don't need find() here.
5146+ match & self . insns [ insn. 0 ] {
5147+ Insn :: IfTrue { target : BranchEdge { target, .. } , .. }
5148+ | Insn :: IfFalse { target : BranchEdge { target, .. } , .. }
5149+ | Insn :: Jump ( BranchEdge { target, .. } ) => {
5150+ num_in_edges[ target. 0 ] += 1 ;
51475151 }
5148- Insn :: Entries { ref targets } => {
5152+ Insn :: Entries { targets } => {
51495153 for target in targets {
51505154 num_in_edges[ target. 0 ] += 1 ;
51515155 }
You can’t perform that action at this time.
0 commit comments