Avoid calling analyze_branch() when the BranchInfo is not needed.
It's faster to just call `opcode().is_branch()`.
This commit is contained in:
@@ -6,7 +6,6 @@
|
|||||||
|
|
||||||
use dominator_tree::DominatorTree;
|
use dominator_tree::DominatorTree;
|
||||||
use entity::{EntityList, ListPool};
|
use entity::{EntityList, ListPool};
|
||||||
use ir::instructions::BranchInfo;
|
|
||||||
use ir::{Inst, Ebb, Value, DataFlowGraph, Layout, ExpandedProgramPoint};
|
use ir::{Inst, Ebb, Value, DataFlowGraph, Layout, ExpandedProgramPoint};
|
||||||
use partition_slice::partition_slice;
|
use partition_slice::partition_slice;
|
||||||
use regalloc::affinity::Affinity;
|
use regalloc::affinity::Affinity;
|
||||||
@@ -261,9 +260,8 @@ impl LiveValueTracker {
|
|||||||
) -> (&[LiveValue], &[LiveValue], &[LiveValue]) {
|
) -> (&[LiveValue], &[LiveValue], &[LiveValue]) {
|
||||||
// Save a copy of the live values before any branches or jumps that could be somebody's
|
// Save a copy of the live values before any branches or jumps that could be somebody's
|
||||||
// immediate dominator.
|
// immediate dominator.
|
||||||
match dfg.analyze_branch(inst) {
|
if dfg[inst].opcode().is_branch() {
|
||||||
BranchInfo::NotABranch => {}
|
self.save_idom_live_set(inst);
|
||||||
_ => self.save_idom_live_set(inst),
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move killed values to the end of the vector.
|
// Move killed values to the end of the vector.
|
||||||
|
|||||||
Reference in New Issue
Block a user