[PATCH] D30391: [X86] Add option to specify preferable loop alignment
Sanjoy Das via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 7 10:59:43 PST 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL297178: [X86] Add option to specify preferable loop alignment (authored by sanjoy).
Changed prior to commit:
https://reviews.llvm.org/D30391?vs=90636&id=90887#toc
Repository:
rL LLVM
https://reviews.llvm.org/D30391
Files:
llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
Index: llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
===================================================================
--- llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
+++ llvm/trunk/lib/Target/X86/X86ISelLowering.cpp
@@ -70,6 +70,13 @@
"rather than promotion."),
cl::Hidden);
+static cl::opt<int> ExperimentalPrefLoopAlignment(
+ "x86-experimental-pref-loop-alignment", cl::init(4),
+ cl::desc("Sets the preferable loop alignment for experiments "
+ "(the last x86-experimental-pref-loop-alignment bits"
+ " of the loop header PC will be 0)."),
+ cl::Hidden);
+
X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
const X86Subtarget &STI)
: TargetLowering(TM), Subtarget(STI) {
@@ -1724,7 +1731,8 @@
MaxStoresPerMemcpyOptSize = 4;
MaxStoresPerMemmove = 8; // For @llvm.memmove -> sequence of stores
MaxStoresPerMemmoveOptSize = 4;
- setPrefLoopAlignment(4); // 2^4 bytes.
+ // Set loop alignment to 2^ExperimentalPrefLoopAlignment bytes (default: 2^4).
+ setPrefLoopAlignment(ExperimentalPrefLoopAlignment);
// An out-of-order CPU can speculatively execute past a predictable branch,
// but a conditional move could be stalled by an expensive earlier operation.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D30391.90887.patch
Type: text/x-patch
Size: 1297 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170307/29c2aec3/attachment.bin>
More information about the llvm-commits
mailing list