diff options
author | Chad Rosier <mcrosier@codeaurora.org> | 2015-12-29 18:18:07 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@codeaurora.org> | 2015-12-29 18:18:07 +0000 |
commit | 6b4326367ad95c39d83236cd30fb3e734f865157 (patch) | |
tree | 373d184f3787b3e31a1d6f89bc5959ec79adc6fd /llvm/lib/CodeGen/MachineFunction.cpp | |
parent | e7d82283cd59e334aea02140dacd7c3d518b48bf (diff) | |
download | llvm-6b4326367ad95c39d83236cd30fb3e734f865157.zip llvm-6b4326367ad95c39d83236cd30fb3e734f865157.tar.gz llvm-6b4326367ad95c39d83236cd30fb3e734f865157.tar.bz2 |
Add command line options to force function/loop alignments.
These are being added for testing purposes.
http://reviews.llvm.org/D15648
llvm-svn: 256571
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineFunction.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp index 80d30a5..ca4bb1c 100644 --- a/llvm/lib/CodeGen/MachineFunction.cpp +++ b/llvm/lib/CodeGen/MachineFunction.cpp @@ -47,6 +47,11 @@ using namespace llvm; #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() {} //===----------------------------------------------------------------------===// @@ -87,6 +92,9 @@ MachineFunction::MachineFunction(const Function *F, const TargetMachine &TM, Alignment = std::max(Alignment, STI->getTargetLowering()->getPrefFunctionAlignment()); + if (AlignAllFunctions) + Alignment = AlignAllFunctions; + FunctionNumber = FunctionNum; JumpTableInfo = nullptr; |