Skip to content
Snippets Groups Projects
Commit 3349feac authored by Nadav Rotem's avatar Nadav Rotem
Browse files

Add a return value to make this function more useful.

llvm-svn: 184200
parent 9917fcad
No related branches found
No related tags found
No related merge requests found
......@@ -225,7 +225,7 @@ Value *BoUpSLP::isUnsafeToSink(Instruction *Src, Instruction *Dst) {
return 0;
}
void BoUpSLP::vectorizeArith(ArrayRef<Value *> Operands) {
Value *BoUpSLP::vectorizeArith(ArrayRef<Value *> Operands) {
int LastIdx = getLastIndex(Operands, Operands.size());
Instruction *Loc = getInsertionPoint(LastIdx);
Builder.SetInsertPoint(Loc);
......@@ -241,6 +241,8 @@ void BoUpSLP::vectorizeArith(ArrayRef<Value *> Operands) {
Value *S = Builder.CreateExtractElement(Vec, Builder.getInt32(i));
Operands[i]->replaceAllUsesWith(S);
}
return Vec;
}
int BoUpSLP::getTreeCost(ArrayRef<Value *> VL) {
......
......@@ -72,7 +72,7 @@ struct BoUpSLP {
bool vectorizeStores(ArrayRef<StoreInst *> Stores, int costThreshold);
/// \brief Vectorize a group of scalars into a vector tree.
void vectorizeArith(ArrayRef<Value *> Operands);
Value *vectorizeArith(ArrayRef<Value *> Operands);
/// \returns the list of new instructions that were added in order to collect
/// scalars into vectors. This list can be used to further optimize the gather
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment