Don't disable block layout when forcing block alignment.

llvm-svn: 179355
This commit is contained in:
Nadav Rotem 2013-04-12 01:24:16 +00:00
parent 25a23bc0ef
commit c0adc9fd91
1 changed files with 6 additions and 8 deletions

View File

@ -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;