Avoid unneeded terminator()
call in fn ignore_edge()
This commit is contained in:
parent
092e4f46be
commit
f92d6699b8
1 changed files with 3 additions and 3 deletions
|
@ -155,9 +155,9 @@ impl<'mir, 'tcx> TriColorVisitor<BasicBlocks<'tcx>> for Search<'mir, 'tcx> {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
// Don't traverse successors of recursive calls or false CFG edges.
|
// Don't traverse successors of recursive calls or false CFG edges.
|
||||||
match self.body[bb].terminator().kind {
|
match &terminator.kind {
|
||||||
TerminatorKind::Call { ref func, ref args, .. } => self.is_recursive_call(func, args),
|
TerminatorKind::Call { func, args, .. } => self.is_recursive_call(func, args),
|
||||||
TerminatorKind::FalseEdge { imaginary_target, .. } => imaginary_target == target,
|
TerminatorKind::FalseEdge { imaginary_target, .. } => imaginary_target == &target,
|
||||||
_ => false,
|
_ => false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue