[llvm] r269654 - [LAA] Add option to disable conflict detection (NFC)

Adam Nemet via llvm-commits llvm-commits at lists.llvm.org
Mon May 16 09:34:21 PDT 2016


Thanks.

> On May 16, 2016, at 9:33 AM, Matthew Simpson <mssimpso at codeaurora.org> wrote:
> 
> Adam,
> 
> No problem. I'll rename the flag in a follow-on.
> 
> -- Matt
> 
> -----Original Message-----
> From: anemet at apple.com [mailto:anemet at apple.com] 
> Sent: Monday, May 16, 2016 12:21 PM
> To: Matthew Simpson <mssimpso at codeaurora.org>
> Cc: llvm-commits at lists.llvm.org
> Subject: Re: [llvm] r269654 - [LAA] Add option to disable conflict detection
> (NFC)
> 
> 
>> On May 16, 2016, at 7:14 AM, Matthew Simpson via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
>> 
>> Author: mssimpso
>> Date: Mon May 16 09:14:49 2016
>> New Revision: 269654
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=269654&view=rev
>> Log:
>> [LAA] Add option to disable conflict detection (NFC)
>> 
>> Modified:
>>   llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp
>> 
>> Modified: llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp
>> URL: 
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/LoopAccess
>> Analysis.cpp?rev=269654&r1=269653&r2=269654&view=diff
>> ======================================================================
>> ========
>> --- llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp (original)
>> +++ llvm/trunk/lib/Analysis/LoopAccessAnalysis.cpp Mon May 16 09:14:49 
>> +++ 2016
>> @@ -65,6 +65,13 @@ 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,
>> +    cl::desc("Enable conflict detection in loop-access analysis"),
>> +    cl::init(true));
> 
> Hi Matt,
> 
> Sorry for the confusion, I meant,
> -store-to-load-forwarding-conflict-detection (conflict-detection is too
> general).
> 
> Thanks,
> Adam
> 
>> +
>> bool VectorizerParams::isInterleaveForced() {
>>  return ::VectorizationInterleave.getNumOccurrences() > 0; } @@ 
>> -1203,7 +1210,7 @@ MemoryDepChecker::isDependent(const MemA
>>  const APInt &Val = C->getAPInt();
>>  if (Val.isNegative()) {
>>    bool IsTrueDataDependence = (AIsWrite && !BIsWrite);
>> -    if (IsTrueDataDependence &&
>> +    if (IsTrueDataDependence && EnableConflictDetection &&
>>        (couldPreventStoreLoadForward(Val.abs().getZExtValue(),
> TypeByteSize) ||
>>         ATy != BTy)) {
>>      DEBUG(dbgs() << "LAA: Forward but may prevent st->ld 
>> forwarding\n"); @@ -1309,7 +1316,7 @@ MemoryDepChecker::isDependent(const
> MemA
>>      Distance < MaxSafeDepDistBytes ? Distance : MaxSafeDepDistBytes;
>> 
>>  bool IsTrueDataDependence = (!AIsWrite && BIsWrite);
>> -  if (IsTrueDataDependence &&
>> +  if (IsTrueDataDependence && EnableConflictDetection &&
>>      couldPreventStoreLoadForward(Distance, TypeByteSize))
>>    return Dependence::BackwardVectorizableButPreventsForwarding;
>> 
>> 
>> 
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
> 
> 



More information about the llvm-commits mailing list