void scheduleBlock(BlockScheduling *BS);
/// List of users to ignore during scheduling and that don't need extracting.
- ArrayRef<Value *> UserIgnoreList;
+ SmallPtrSet<Value *, 4> UserIgnoreList;
/// A DenseMapInfo implementation for holding DenseMaps and DenseSets of
/// sorted SmallVectors of unsigned.
}
// Ignore users in the user ignore list.
- if (is_contained(UserIgnoreList, UserInst))
+ if (UserIgnoreList.contains(UserInst))
continue;
LLVM_DEBUG(dbgs() << "SLP: Need to extract:" << *U << " from lane "
void BoUpSLP::buildTree(ArrayRef<Value *> Roots,
ArrayRef<Value *> UserIgnoreLst) {
deleteTree();
- UserIgnoreList = UserIgnoreLst;
+ UserIgnoreList.clear();
+ UserIgnoreList.insert(UserIgnoreLst.begin(), UserIgnoreLst.end());
if (!allSameType(Roots))
return;
buildTree_rec(Roots, 0, EdgeInfo());
// The reduction nodes (stored in UserIgnoreList) also should stay scalar.
for (Value *V : VL) {
- if (is_contained(UserIgnoreList, V)) {
+ if (UserIgnoreList.contains(V)) {
LLVM_DEBUG(dbgs() << "SLP: Gathering due to gathered scalar.\n");
if (TryToFindDuplicates(S))
newTreeEntry(VL, None /*not vectorized*/, S, UserTreeIdx,
LLVM_DEBUG(dbgs() << "SLP: \tvalidating user:" << *U << ".\n");
// It is legal to delete users in the ignorelist.
- assert((getTreeEntry(U) || is_contained(UserIgnoreList, U) ||
+ assert((getTreeEntry(U) || UserIgnoreList.contains(U) ||
(isa_and_nonnull<Instruction>(U) &&
isDeleted(cast<Instruction>(U)))) &&
"Deleting out-of-tree value");