Add loop aligning to MachineBlockPlacement based on review discussion so
authorChandler Carruth <chandlerc@gmail.com>
Fri, 21 Oct 2011 08:57:37 +0000 (08:57 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Fri, 21 Oct 2011 08:57:37 +0000 (08:57 +0000)
commit4a85cc982a977ddeb0249eb9304326deabe3a7a5
treee094b2119f65c0bc5fd6b08ec06d68c13453ed30
parent4162eced737c83a193247f48dd1c608e82fa2a35
Add loop aligning to MachineBlockPlacement based on review discussion so
it's a bit more plausible to use this instead of CodePlacementOpt. The
code for this was shamelessly stolen from CodePlacementOpt, and then
trimmed down a bit. There doesn't seem to be much utility in returning
true/false from this pass as we may or may not have rewritten all of the
blocks. Also, the statistic of counting how many loops were aligned
doesn't seem terribly important so I removed it. If folks would like it
to be included, I'm happy to add it back.

This was probably the most egregious of the missing features, and now
I'm going to start gathering some performance numbers and looking at
specific loop structures that have different layout between the two.

Test is updated to include both basic loop alignment and nested loop
alignment.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@142645 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/MachineBlockPlacement.cpp
test/CodeGen/X86/block-placement.ll