diff options
author | Amaury Sechet <deadalnix@gmail.com> | 2016-04-07 04:28:40 +0000 |
---|---|---|
committer | Amaury Sechet <deadalnix@gmail.com> | 2016-04-07 04:28:40 +0000 |
commit | 41474a52e7ddd0a2f2844d06e7811a69479f3c90 (patch) | |
tree | da386ca448b28cc9232031355d7186f3d03a1f8a /llvm/lib/CodeGen/MachineBlockPlacement.cpp | |
parent | 45601e867d6990b50b1ad54c8db7bbac0950684d (diff) | |
download | llvm-41474a52e7ddd0a2f2844d06e7811a69479f3c90.zip llvm-41474a52e7ddd0a2f2844d06e7811a69479f3c90.tar.gz llvm-41474a52e7ddd0a2f2844d06e7811a69479f3c90.tar.bz2 |
Revert "[BlockPlacement] Remove an unnecessary continue" and "[MBP] Remove an unused function parameter"
llvm-svn: 265638
Diffstat (limited to 'llvm/lib/CodeGen/MachineBlockPlacement.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineBlockPlacement.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/MachineBlockPlacement.cpp b/llvm/lib/CodeGen/MachineBlockPlacement.cpp index 69c0a53..67f2545 100644 --- a/llvm/lib/CodeGen/MachineBlockPlacement.cpp +++ b/llvm/lib/CodeGen/MachineBlockPlacement.cpp @@ -268,7 +268,8 @@ class MachineBlockPlacement : public MachineFunctionPass { const BlockFilterSet *BlockFilter); MachineBasicBlock * selectBestCandidateBlock(BlockChain &Chain, - SmallVectorImpl<MachineBasicBlock *> &WorkList); + SmallVectorImpl<MachineBasicBlock *> &WorkList, + const BlockFilterSet *BlockFilter); MachineBasicBlock * getFirstUnplacedBlock(MachineFunction &F, const BlockChain &PlacedChain, MachineFunction::iterator &PrevUnplacedBlockIt, @@ -521,7 +522,8 @@ MachineBlockPlacement::selectBestSuccessor(MachineBasicBlock *BB, /// /// \returns The best block found, or null if none are viable. MachineBasicBlock *MachineBlockPlacement::selectBestCandidateBlock( - BlockChain &Chain, SmallVectorImpl<MachineBasicBlock *> &WorkList) { + BlockChain &Chain, SmallVectorImpl<MachineBasicBlock *> &WorkList, + const BlockFilterSet *BlockFilter) { // Once we need to walk the worklist looking for a candidate, cleanup the // worklist of already placed entries. // FIXME: If this shows up on profiles, it could be folded (at the cost of @@ -628,7 +630,7 @@ void MachineBlockPlacement::buildChain( // block among those we've identified as not violating the loop's CFG at // this point. This won't be a fallthrough, but it will increase locality. if (!BestSucc) - BestSucc = selectBestCandidateBlock(Chain, BlockWorkList); + BestSucc = selectBestCandidateBlock(Chain, BlockWorkList, BlockFilter); if (!BestSucc) { BestSucc = @@ -809,6 +811,7 @@ MachineBlockPlacement::findBestLoopExit(MachineFunction &F, MachineLoop &L, // Restore the old exiting state, no viable looping successor was found. ExitingBB = OldExitingBB; BestExitEdgeFreq = OldBestExitEdgeFreq; + continue; } } // Without a candidate exiting block or with only a single block in the |