[llvm] r269668 - [LAA] Rename forwarding conflict detection option (NFC)

Matthew Simpson via llvm-commits llvm-commits at lists.llvm.org
Mon May 16 10:00:56 PDT 2016


Author: mssimpso
Date: Mon May 16 12:00:56 2016
New Revision: 269668

URL: http://llvm.org/viewvc/llvm-project?rev=269668&view=rev
Log:
[LAA] Rename forwarding conflict detection option (NFC)

This patch renames the option enabling the store-to-load forwarding conflict
detection optimization. This change was requested in the review of D20241.

Modified:
    llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp
    llvm/trunk/test/Transforms/LoopVectorize/AArch64/max-vf-for-interleaved.ll

Modified: llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp?rev=269668&r1=269667&r2=269668&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp (original)
+++ llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp Mon May 16 12:00:56 2016
@@ -65,10 +65,10 @@ static cl::opt<unsigned>
                             "loop-access analysis (default = 100)"),
                    cl::init(100));
 
-/// \brief Enable the conflict detection optimization. This option can be
-/// disabled for correctness testing.
-static cl::opt<bool> EnableConflictDetection(
-    "enable-conflict-detection", cl::Hidden,
+/// \brief Enable store-to-load forwarding conflict detection. This option can
+/// be disabled for correctness testing.
+static cl::opt<bool> EnableForwardingConflictDetection(
+    "store-to-load-forwarding-conflict-detection", cl::Hidden,
     cl::desc("Enable conflict detection in loop-access analysis"),
     cl::init(true));
 
@@ -1216,7 +1216,7 @@ MemoryDepChecker::isDependent(const MemA
   const APInt &Val = C->getAPInt();
   if (Val.isNegative()) {
     bool IsTrueDataDependence = (AIsWrite && !BIsWrite);
-    if (IsTrueDataDependence && EnableConflictDetection &&
+    if (IsTrueDataDependence && EnableForwardingConflictDetection &&
         (couldPreventStoreLoadForward(Val.abs().getZExtValue(), TypeByteSize) ||
          ATy != BTy)) {
       DEBUG(dbgs() << "LAA: Forward but may prevent st->ld forwarding\n");
@@ -1322,7 +1322,7 @@ MemoryDepChecker::isDependent(const MemA
       Distance < MaxSafeDepDistBytes ? Distance : MaxSafeDepDistBytes;
 
   bool IsTrueDataDependence = (!AIsWrite && BIsWrite);
-  if (IsTrueDataDependence && EnableConflictDetection &&
+  if (IsTrueDataDependence && EnableForwardingConflictDetection &&
       couldPreventStoreLoadForward(Distance, TypeByteSize))
     return Dependence::BackwardVectorizableButPreventsForwarding;
 

Modified: llvm/trunk/test/Transforms/LoopVectorize/AArch64/max-vf-for-interleaved.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/LoopVectorize/AArch64/max-vf-for-interleaved.ll?rev=269668&r1=269667&r2=269668&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/LoopVectorize/AArch64/max-vf-for-interleaved.ll (original)
+++ llvm/trunk/test/Transforms/LoopVectorize/AArch64/max-vf-for-interleaved.ll Mon May 16 12:00:56 2016
@@ -1,4 +1,4 @@
-; RUN: opt < %s -force-vector-interleave=1 -enable-conflict-detection=false -loop-vectorize -dce -instcombine -S | FileCheck %s
+; RUN: opt < %s -force-vector-interleave=1 -store-to-load-forwarding-conflict-detection=false -loop-vectorize -dce -instcombine -S | FileCheck %s
 
 target datalayout = "e-m:e-i64:64-i128:128-n32:64-S128"
 target triple = "aarch64--linux-gnu"




More information about the llvm-commits mailing list