These are being added for testing purposes.
http://reviews.llvm.org/D15648
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@256571
91177308-0d34-0410-b5e6-
96231b3b80d8
"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",
+ 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.
#define DEBUG_TYPE "codegen"
#define DEBUG_TYPE "codegen"
+static cl::opt<unsigned>
+ AlignAllFunctions("align-all-functions",
+ cl::desc("Force the alignment of all functions."),
+ cl::init(0), cl::Hidden);
+
void MachineFunctionInitializer::anchor() {}
//===----------------------------------------------------------------------===//
void MachineFunctionInitializer::anchor() {}
//===----------------------------------------------------------------------===//
Alignment = std::max(Alignment,
STI->getTargetLowering()->getPrefFunctionAlignment());
Alignment = std::max(Alignment,
STI->getTargetLowering()->getPrefFunctionAlignment());
+ if (AlignAllFunctions)
+ Alignment = AlignAllFunctions;
+
FunctionNumber = FunctionNum;
JumpTableInfo = nullptr;
FunctionNumber = FunctionNum;
JumpTableInfo = nullptr;