From 37ec5f914e2b677f534874eeba1e1b0cb53e4f70 Mon Sep 17 00:00:00 2001 From: Matthew Simpson Date: Mon, 16 May 2016 17:00:56 +0000 Subject: [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 --- llvm/lib/Analysis/LoopAccessAnalysis.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'llvm/lib/Analysis/LoopAccessAnalysis.cpp') 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 "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 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 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; -- cgit v1.2.3