diff options
author | Chandler Carruth <chandlerc@gmail.com> | 2015-03-05 01:07:03 +0000 |
---|---|---|
committer | Chandler Carruth <chandlerc@gmail.com> | 2015-03-05 01:07:03 +0000 |
commit | af7e99f2f4be1c49a3827a18eb3529ff6ee3351a (patch) | |
tree | dd78e5abcd734f9472cb1a4fb91c8cae36465b6e /llvm/lib/CodeGen/MachineBlockPlacement.cpp | |
parent | 8f49dd3687a3d126cccb359e9f261e3fef0449f7 (diff) | |
download | llvm-af7e99f2f4be1c49a3827a18eb3529ff6ee3351a.zip llvm-af7e99f2f4be1c49a3827a18eb3529ff6ee3351a.tar.gz llvm-af7e99f2f4be1c49a3827a18eb3529ff6ee3351a.tar.bz2 |
[MBP] Revert r231238 which attempted to fix a nasty bug where MBP is
just arbitrarily interleaving unrelated control flows once they get
moved "out-of-line" (both outside of natural CFG ordering and with
diamonds that cannot be fully laid out by chaining fallthrough edges).
This easy solution doesn't work in practice, and it isn't just a small
bug. It looks like a very different strategy will be required. I'm
working on that now, and it'll again go behind some flag so that
everyone can experiment and make sure it is working well for them.
llvm-svn: 231332
Diffstat (limited to 'llvm/lib/CodeGen/MachineBlockPlacement.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineBlockPlacement.cpp | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/llvm/lib/CodeGen/MachineBlockPlacement.cpp b/llvm/lib/CodeGen/MachineBlockPlacement.cpp index ae0f5bd..e4ddb04 100644 --- a/llvm/lib/CodeGen/MachineBlockPlacement.cpp +++ b/llvm/lib/CodeGen/MachineBlockPlacement.cpp @@ -68,13 +68,6 @@ ExitBlockBias("block-placement-exit-block-bias", "over the original exit to be considered the new exit."), cl::init(0), cl::Hidden); -static cl::opt<bool> PlaceLastSuccessor( - "place-last-successor", - cl::desc("When selecting a non-successor block, choose the last block to " - "have been a successor. This represents the block whose " - "predecessor was most recently placed."), - cl::init(false), cl::Hidden); - static cl::opt<bool> OutlineOptionalBranches( "outline-optional-branches", cl::desc("Put completely optional branches, i.e. branches with a common " @@ -450,25 +443,6 @@ MachineBasicBlock *MachineBlockPlacement::selectBestSuccessor( MachineBasicBlock *MachineBlockPlacement::selectBestCandidateBlock( BlockChain &Chain, SmallVectorImpl<MachineBasicBlock *> &WorkList, const BlockFilterSet *BlockFilter) { - if (PlaceLastSuccessor) { - // If we're just placing the last successor as the best candidate, the - // logic is super simple. We skip the already placed entries on the - // worklist and return the most recently added entry that isn't placed. - while (!WorkList.empty()) { - MachineBasicBlock *SuccBB = WorkList.pop_back_val(); - BlockChain &SuccChain = *BlockToChain.lookup(SuccBB); - if (&SuccChain == &Chain) { - DEBUG(dbgs() << " " << getBlockName(SuccBB) - << " -> Already merged!\n"); - continue; - } - assert(SuccChain.LoopPredecessors == 0 && "Found CFG-violating block"); - return SuccBB; - } - - return nullptr; - } - // 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 |