diff options
author | Matthew Simpson <mssimpso@codeaurora.org> | 2016-05-16 17:00:56 +0000 |
---|---|---|
committer | Matthew Simpson <mssimpso@codeaurora.org> | 2016-05-16 17:00:56 +0000 |
commit | 37ec5f914e2b677f534874eeba1e1b0cb53e4f70 (patch) | |
tree | 1b651b248d1a1bcbd6a650d1044c8c41a8c892ba | |
parent | 884d313b7f5a1584cc467339e18d73bcb3a30489 (diff) | |
download | bcm5719-llvm-37ec5f914e2b677f534874eeba1e1b0cb53e4f70.tar.gz bcm5719-llvm-37ec5f914e2b677f534874eeba1e1b0cb53e4f70.zip |
[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.
llvm-svn: 269668
-rw-r--r-- | llvm/lib/Analysis/LoopAccessAnalysis.cpp | 12 | ||||
-rw-r--r-- | llvm/test/Transforms/LoopVectorize/AArch64/max-vf-for-interleaved.ll | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/llvm/lib/Analysis/LoopAccessAnalysis.cpp b/llvm/lib/Analysis/LoopAccessAnalysis.cpp index 0b41da5bbe1..9193e38b573 100644 --- a/llvm/lib/Analysis/LoopAccessAnalysis.cpp +++ b/llvm/lib/Analysis/LoopAccessAnalysis.cpp @@ -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 MemAccessInfo &A, unsigned AIdx, 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 MemAccessInfo &A, unsigned AIdx, Distance < MaxSafeDepDistBytes ? Distance : MaxSafeDepDistBytes; bool IsTrueDataDependence = (!AIsWrite && BIsWrite); - if (IsTrueDataDependence && EnableConflictDetection && + if (IsTrueDataDependence && EnableForwardingConflictDetection && couldPreventStoreLoadForward(Distance, TypeByteSize)) return Dependence::BackwardVectorizableButPreventsForwarding; diff --git a/llvm/test/Transforms/LoopVectorize/AArch64/max-vf-for-interleaved.ll b/llvm/test/Transforms/LoopVectorize/AArch64/max-vf-for-interleaved.ll index ad1dd0edc3b..8b9589aebba 100644 --- a/llvm/test/Transforms/LoopVectorize/AArch64/max-vf-for-interleaved.ll +++ b/llvm/test/Transforms/LoopVectorize/AArch64/max-vf-for-interleaved.ll @@ -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" |