mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-04 17:58:22 +00:00
[LAA] clang-format the function couldPreventStoreLoadForward. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@269666 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ec3abaa727
commit
24331f2d7f
@ -1081,28 +1081,28 @@ bool MemoryDepChecker::couldPreventStoreLoadForward(unsigned Distance,
|
||||
// hence on your typical architecture store-load forwarding does not take
|
||||
// place. Vectorizing in such cases does not make sense.
|
||||
// Store-load forwarding distance.
|
||||
const unsigned NumCyclesForStoreLoadThroughMemory = 8*TypeByteSize;
|
||||
const unsigned NumCyclesForStoreLoadThroughMemory = 8 * TypeByteSize;
|
||||
// Maximum vector factor.
|
||||
unsigned MaxVFWithoutSLForwardIssues = std::min(
|
||||
VectorizerParams::MaxVectorWidth * TypeByteSize, MaxSafeDepDistBytes);
|
||||
|
||||
for (unsigned vf = 2*TypeByteSize; vf <= MaxVFWithoutSLForwardIssues;
|
||||
vf *= 2) {
|
||||
if (Distance % vf && Distance / vf < NumCyclesForStoreLoadThroughMemory) {
|
||||
MaxVFWithoutSLForwardIssues = (vf >>=1);
|
||||
for (unsigned VF = 2 * TypeByteSize; VF <= MaxVFWithoutSLForwardIssues;
|
||||
VF *= 2) {
|
||||
if (Distance % VF && Distance / VF < NumCyclesForStoreLoadThroughMemory) {
|
||||
MaxVFWithoutSLForwardIssues = (VF >>= 1);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (MaxVFWithoutSLForwardIssues< 2*TypeByteSize) {
|
||||
DEBUG(dbgs() << "LAA: Distance " << Distance <<
|
||||
" that could cause a store-load forwarding conflict\n");
|
||||
if (MaxVFWithoutSLForwardIssues < 2 * TypeByteSize) {
|
||||
DEBUG(dbgs() << "LAA: Distance " << Distance
|
||||
<< " that could cause a store-load forwarding conflict\n");
|
||||
return true;
|
||||
}
|
||||
|
||||
if (MaxVFWithoutSLForwardIssues < MaxSafeDepDistBytes &&
|
||||
MaxVFWithoutSLForwardIssues !=
|
||||
VectorizerParams::MaxVectorWidth * TypeByteSize)
|
||||
VectorizerParams::MaxVectorWidth * TypeByteSize)
|
||||
MaxSafeDepDistBytes = MaxVFWithoutSLForwardIssues;
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user