summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/VectorUtils.cpp
diff options
context:
space:
mode:
authorDorit Nuzman <dorit.nuzman@intel.com>2018-10-14 07:21:20 +0000
committerDorit Nuzman <dorit.nuzman@intel.com>2018-10-14 07:21:20 +0000
commit5118c68cde1ab1a70ca61e3e75cab48653dfd5b9 (patch)
tree5f8d90a57ed707983d11e85947c36f607e00272f /llvm/lib/Analysis/VectorUtils.cpp
parent8174368955177c0765977996b00a0184921d5420 (diff)
downloadbcm5719-llvm-5118c68cde1ab1a70ca61e3e75cab48653dfd5b9.tar.gz
bcm5719-llvm-5118c68cde1ab1a70ca61e3e75cab48653dfd5b9.zip
revert 344472 due to failures.
llvm-svn: 344473
Diffstat (limited to 'llvm/lib/Analysis/VectorUtils.cpp')
-rw-r--r--llvm/lib/Analysis/VectorUtils.cpp29
1 files changed, 9 insertions, 20 deletions
diff --git a/llvm/lib/Analysis/VectorUtils.cpp b/llvm/lib/Analysis/VectorUtils.cpp
index e14449b8838..272c665ace1 100644
--- a/llvm/lib/Analysis/VectorUtils.cpp
+++ b/llvm/lib/Analysis/VectorUtils.cpp
@@ -502,16 +502,6 @@ Instruction *llvm::propagateMetadata(Instruction *Inst, ArrayRef<Value *> VL) {
return Inst;
}
-Constant *llvm::createReplicatedMask(IRBuilder<> &Builder,
- unsigned ReplicationFactor, unsigned VF) {
- SmallVector<Constant *, 16> MaskVec;
- for (unsigned i = 0; i < VF; i++)
- for (unsigned j = 0; j < ReplicationFactor; j++)
- MaskVec.push_back(Builder.getInt32(i));
-
- return ConstantVector::get(MaskVec);
-}
-
Constant *llvm::createInterleaveMask(IRBuilder<> &Builder, unsigned VF,
unsigned NumVecs) {
SmallVector<Constant *, 16> Mask;
@@ -682,8 +672,7 @@ void InterleavedAccessInfo::collectConstStrideAccesses(
// this group because it and (2) are dependent. However, (1) can be grouped
// with other accesses that may precede it in program order. Note that a
// bottom-up order does not imply that WAW dependences should not be checked.
-void InterleavedAccessInfo::analyzeInterleaving(
- bool EnablePredicatedInterleavedMemAccesses) {
+void InterleavedAccessInfo::analyzeInterleaving() {
LLVM_DEBUG(dbgs() << "LV: Analyzing interleaved accesses...\n");
const ValueToValueMap &Strides = LAI->getSymbolicStrides();
@@ -723,8 +712,9 @@ void InterleavedAccessInfo::analyzeInterleaving(
// create a group for B, we continue with the bottom-up algorithm to ensure
// we don't break any of B's dependences.
InterleaveGroup *Group = nullptr;
- if (isStrided(DesB.Stride) &&
- (!isPredicated(B->getParent()) || EnablePredicatedInterleavedMemAccesses)) {
+ // TODO: Ignore B if it is in a predicated block. This restriction can be
+ // relaxed in the future once we handle masked interleaved groups.
+ if (isStrided(DesB.Stride) && !isPredicated(B->getParent())) {
Group = getInterleaveGroup(B);
if (!Group) {
LLVM_DEBUG(dbgs() << "LV: Creating an interleave group with:" << *B
@@ -818,12 +808,11 @@ void InterleavedAccessInfo::analyzeInterleaving(
if (DistanceToB % static_cast<int64_t>(DesB.Size))
continue;
- // All members of a predicated interleave-group must have the same predicate,
- // and currently must reside in the same BB.
- BasicBlock *BlockA = A->getParent();
- BasicBlock *BlockB = B->getParent();
- if ((isPredicated(BlockA) || isPredicated(BlockB)) &&
- (!EnablePredicatedInterleavedMemAccesses || BlockA != BlockB))
+ // Ignore A if either A or B is in a predicated block. Although we
+ // currently prevent group formation for predicated accesses, we may be
+ // able to relax this limitation in the future once we handle more
+ // complicated blocks.
+ if (isPredicated(A->getParent()) || isPredicated(B->getParent()))
continue;
// The index of A is the index of B plus A's distance to B in multiples
OpenPOWER on IntegriCloud