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