projects
/
oota-llvm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove extra whitespace. NFC.
[oota-llvm.git]
/
lib
/
CodeGen
/
MachineBlockPlacement.cpp
diff --git
a/lib/CodeGen/MachineBlockPlacement.cpp
b/lib/CodeGen/MachineBlockPlacement.cpp
index fcddf346cf680cf2221e730a86f3b047425161d7..f5e3056450116514c2960b7c7794a248257bef1b 100644
(file)
--- a/
lib/CodeGen/MachineBlockPlacement.cpp
+++ b/
lib/CodeGen/MachineBlockPlacement.cpp
@@
-62,6
+62,11
@@
static cl::opt<unsigned> AlignAllBlock("align-all-blocks",
"blocks in the function."),
cl::init(0), cl::Hidden);
"blocks in the function."),
cl::init(0), cl::Hidden);
+static cl::opt<unsigned>
+ AlignAllLoops("align-all-loops",
+ cl::desc("Force the alignment of all loops in the function."),
+ cl::init(0), cl::Hidden);
+
// FIXME: Find a good default for this flag and remove the flag.
static cl::opt<unsigned> ExitBlockBias(
"block-placement-exit-block-bias",
// FIXME: Find a good default for this flag and remove the flag.
static cl::opt<unsigned> ExitBlockBias(
"block-placement-exit-block-bias",
@@
-1329,6
+1334,11
@@
void MachineBlockPlacement::buildCFGChains(MachineFunction &F) {
if (!L)
continue;
if (!L)
continue;
+ if (AlignAllLoops) {
+ ChainBB->setAlignment(AlignAllLoops);
+ continue;
+ }
+
unsigned Align = TLI->getPrefLoopAlignment(L);
if (!Align)
continue; // Don't care about loop alignment.
unsigned Align = TLI->getPrefLoopAlignment(L);
if (!Align)
continue; // Don't care about loop alignment.