diff options
author | Nadav Rotem <nrotem@apple.com> | 2013-04-12 01:24:16 +0000 |
---|---|---|
committer | Nadav Rotem <nrotem@apple.com> | 2013-04-12 01:24:16 +0000 |
commit | c0adc9fd9170e7b5dd25707c47f7924094f512ff (patch) | |
tree | df32fb6c7e3de8b6ae51750ed0b402dc83be7eeb /llvm/lib/CodeGen/MachineBlockPlacement.cpp | |
parent | 25a23bc0effd5af3e86fea34efd5260bc1b3cd97 (diff) | |
download | llvm-c0adc9fd9170e7b5dd25707c47f7924094f512ff.zip llvm-c0adc9fd9170e7b5dd25707c47f7924094f512ff.tar.gz llvm-c0adc9fd9170e7b5dd25707c47f7924094f512ff.tar.bz2 |
Don't disable block layout when forcing block alignment.
llvm-svn: 179355
Diffstat (limited to 'llvm/lib/CodeGen/MachineBlockPlacement.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineBlockPlacement.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/MachineBlockPlacement.cpp b/llvm/lib/CodeGen/MachineBlockPlacement.cpp index 774df81..bfba503 100644 --- a/llvm/lib/CodeGen/MachineBlockPlacement.cpp +++ b/llvm/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; |