mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-15 04:30:12 +00:00
blockfreq: Use getSuccessorIndex()
No functionality change. <rdar://problem/14292693> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206082 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
06e433a099
commit
484a2b6c2f
@ -594,11 +594,9 @@ getEdgeWeight(const BasicBlock *Src, unsigned IndexInSuccessors) const {
|
|||||||
return DEFAULT_WEIGHT;
|
return DEFAULT_WEIGHT;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t
|
uint32_t BranchProbabilityInfo::getEdgeWeight(const BasicBlock *Src,
|
||||||
BranchProbabilityInfo::
|
succ_const_iterator Dst) const {
|
||||||
getEdgeWeight(const BasicBlock *Src, succ_const_iterator Dst) const {
|
return getEdgeWeight(Src, Dst.getSuccessorIndex());
|
||||||
size_t index = std::distance(succ_begin(Src), Dst);
|
|
||||||
return getEdgeWeight(Src, index);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Get the raw edge weight calculated for the block pair. This returns the sum
|
/// Get the raw edge weight calculated for the block pair. This returns the sum
|
||||||
|
Loading…
Reference in New Issue
Block a user