}
}
- return Changed;
+ return Changed;
}
bool SLPVectorizer::vectorizeStores(ArrayRef<StoreInst *> Stores,
return false;
unsigned Opcode0 = I0->getOpcode();
-
+
Type *Ty0 = I0->getType();
unsigned Sz = DL->getTypeSizeInBits(Ty0);
unsigned VF = MinVecRegSize / Sz;
}
bool Changed = false;
-
+
for (unsigned i = 0, e = VL.size(); i < e; ++i) {
unsigned OpsWidth = 0;
-
- if (i + VF > e)
+
+ if (i + VF > e)
OpsWidth = e - i;
else
OpsWidth = VF;
if (!isPowerOf2_32(OpsWidth) || OpsWidth < 2)
break;
- DEBUG(dbgs() << "SLP: Analyzing " << OpsWidth << " operations " << "\n");
+ DEBUG(dbgs() << "SLP: Analyzing " << OpsWidth << " operations "
+ << "\n");
ArrayRef<Value *> Ops = VL.slice(i, OpsWidth);
-
+
R.buildTree(Ops);
int Cost = R.getTreeCost();
-
+
if (Cost < -SLPCostThreshold) {
DEBUG(dbgs() << "SLP: Vectorizing pair at cost:" << Cost << ".\n");
R.vectorizeTree();
-
+
// Move to the next bundle.
i += VF - 1;
Changed = true;
}
}
-
- return Changed;
+
+ return Changed;
}
bool SLPVectorizer::tryToVectorize(BinaryOperator *V, BoUpSLP &R) {