mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-11 08:29:25 +00:00
Revert "Fix a quadratic algorithm in MachineBranchProbabilityInfo."
It caused an assertion failure when compiling consumer-typeset. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161463 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -912,11 +912,12 @@ MachineBasicBlock::findDebugLoc(instr_iterator MBBI) {
|
||||
|
||||
/// getSuccWeight - Return weight of the edge from this block to MBB.
|
||||
///
|
||||
uint32_t MachineBasicBlock::getSuccWeight(const_succ_iterator Succ) const {
|
||||
uint32_t MachineBasicBlock::getSuccWeight(const MachineBasicBlock *succ) const {
|
||||
if (Weights.empty())
|
||||
return 0;
|
||||
|
||||
return *getWeightIterator(Succ);
|
||||
const_succ_iterator I = std::find(Successors.begin(), Successors.end(), succ);
|
||||
return *getWeightIterator(I);
|
||||
}
|
||||
|
||||
/// getWeightIterator - Return wight iterator corresonding to the I successor
|
||||
|
Reference in New Issue
Block a user