Add a much more conservative strategy for aligning branch targets.
authorChandler Carruth <chandlerc@gmail.com>
Tue, 7 Aug 2012 09:45:24 +0000 (09:45 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Tue, 7 Aug 2012 09:45:24 +0000 (09:45 +0000)
commite6450dc2afc18531bf9b70180a9f67376d9f00c7
tree88d92e7932ae7528c097316ea06db60180d92d94
parentba86b13ad9cd6a9707a954598863da1e2a9f773b
Add a much more conservative strategy for aligning branch targets.
Previously, MBP essentially aligned every branch target it could. This
bloats code quite a bit, especially non-looping code which has no real
reason to prefer aligned branch targets so heavily.

As Andy said in review, it's still a bit odd to do this without a real
cost model, but this at least has much more plausible heuristics.

Fixes PR13265.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161409 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/MachineBlockPlacement.cpp
test/CodeGen/X86/2008-10-27-CoalescerBug.ll
test/CodeGen/X86/block-placement.ll
test/CodeGen/X86/loop-blocks.ll
test/Transforms/LoopStrengthReduce/X86/2012-01-13-phielim.ll