[llvm] 9c19b36 - [X86] Remove -x86-experimental-pref-loop-alignment in favor of -align-loops

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 4 13:24:01 PDT 2021


Author: Fangrui Song
Date: 2021-08-04T13:23:57-07:00
New Revision: 9c19b36f1c61fb282c2625c831555fb2f55e3df4

URL: https://github.com/llvm/llvm-project/commit/9c19b36f1c61fb282c2625c831555fb2f55e3df4
DIFF: https://github.com/llvm/llvm-project/commit/9c19b36f1c61fb282c2625c831555fb2f55e3df4.diff

LOG: [X86] Remove -x86-experimental-pref-loop-alignment in favor of -align-loops

Added: 
    

Modified: 
    llvm/lib/Target/X86/X86ISelLowering.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index 2689212795ec..ebbffa1c82fe 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -71,14 +71,6 @@ using namespace llvm;
 
 STATISTIC(NumTailCalls, "Number of tail calls");
 
-static cl::opt<int> ExperimentalPrefLoopAlignment(
-    "x86-experimental-pref-loop-alignment", cl::init(4),
-    cl::desc(
-        "Sets the preferable loop alignment for experiments (as log2 bytes)"
-        "(the last x86-experimental-pref-loop-alignment bits"
-        " of the loop header PC will be 0)."),
-    cl::Hidden);
-
 static cl::opt<int> ExperimentalPrefInnermostLoopAlignment(
     "x86-experimental-pref-innermost-loop-alignment", cl::init(4),
     cl::desc(
@@ -2070,8 +2062,8 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
   MaxLoadsPerMemcmp = 2;
   MaxLoadsPerMemcmpOptSize = 2;
 
-  // Set loop alignment to 2^ExperimentalPrefLoopAlignment bytes (default: 2^4).
-  setPrefLoopAlignment(Align(1ULL << ExperimentalPrefLoopAlignment));
+  // Default loop alignment, which can be overridden by -align-loops.
+  setPrefLoopAlignment(Align(16));
 
   // An out-of-order CPU can speculatively execute past a predictable branch,
   // but a conditional move could be stalled by an expensive earlier operation.


        


More information about the llvm-commits mailing list