aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/MachineBlockPlacement.cpp
diff options
context:
space:
mode:
authorNadav Rotem <nrotem@apple.com>2013-04-12 01:24:16 +0000
committerNadav Rotem <nrotem@apple.com>2013-04-12 01:24:16 +0000
commit33a47d66e9f9126017d051bfba35cb9be6609b3e (patch)
tree3ba678242072a82a8f1628dd7cf7f7b4eb74697e /lib/CodeGen/MachineBlockPlacement.cpp
parent67b290c7fdbfc5ab8b701c5d490527f0aba36761 (diff)
Don't disable block layout when forcing block alignment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@179355 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineBlockPlacement.cpp')
-rw-r--r--lib/CodeGen/MachineBlockPlacement.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/lib/CodeGen/MachineBlockPlacement.cpp b/lib/CodeGen/MachineBlockPlacement.cpp
index 774df81b4d..bfba503b35 100644
--- a/lib/CodeGen/MachineBlockPlacement.cpp
+++ b/lib/CodeGen/MachineBlockPlacement.cpp
@@ -1089,19 +1089,17 @@ bool MachineBlockPlacement::runOnMachineFunction(MachineFunction &F) {
TLI = F.getTarget().getTargetLowering();
assert(BlockToChain.empty());
- if (AlignAllBlock) {
- // Align all of the blocks in the function to a specific alignment.
- for (MachineFunction::iterator FI = F.begin(), FE = F.end();
- FI != FE; ++FI)
- FI->setAlignment(AlignAllBlock);
- return true;
- }
-
buildCFGChains(F);
BlockToChain.clear();
ChainAllocator.DestroyAll();
+ if (AlignAllBlock)
+ // Align all of the blocks in the function to a specific alignment.
+ for (MachineFunction::iterator FI = F.begin(), FE = F.end();
+ FI != FE; ++FI)
+ FI->setAlignment(AlignAllBlock);
+
// We always return true as we have no way to track whether the final order
// differs from the original order.
return true;