Skip to content

Commit 94c6ce1

Browse files
committed
[SLPVectorizer] Use IRBuilderBase where possible (NFC)
Instead of hardcoding a specific IRBuilder type, use the base class.
1 parent 9f80444 commit 94c6ce1

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

llvm/lib/Transforms/Vectorize/SLPVectorizer.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11677,7 +11677,7 @@ Value *BoUpSLP::createBuildVector(const TreeEntry *E) {
1167711677
}
1167811678

1167911679
Value *BoUpSLP::vectorizeTree(TreeEntry *E, bool PostponedPHIs) {
11680-
IRBuilder<>::InsertPointGuard Guard(Builder);
11680+
IRBuilderBase::InsertPointGuard Guard(Builder);
1168111681

1168211682
if (E->VectorizedValue &&
1168311683
(E->State != TreeEntry::Vectorize || E->getOpcode() != Instruction::PHI ||
@@ -12700,7 +12700,7 @@ Value *BoUpSLP::vectorizeTree(
1270012700
auto Key = std::make_pair(Vec, ScalarTy);
1270112701
auto VecIt = VectorCasts.find(Key);
1270212702
if (VecIt == VectorCasts.end()) {
12703-
IRBuilder<>::InsertPointGuard Guard(Builder);
12703+
IRBuilderBase::InsertPointGuard Guard(Builder);
1270412704
if (auto *IVec = dyn_cast<Instruction>(Vec))
1270512705
Builder.SetInsertPoint(IVec->getNextNonDebugInstruction());
1270612706
Vec = Builder.CreateIntCast(
@@ -14689,7 +14689,7 @@ class HorizontalReduction {
1468914689
}
1469014690

1469114691
/// Creates reduction operation with the current opcode.
14692-
static Value *createOp(IRBuilder<> &Builder, RecurKind Kind, Value *LHS,
14692+
static Value *createOp(IRBuilderBase &Builder, RecurKind Kind, Value *LHS,
1469314693
Value *RHS, const Twine &Name, bool UseSelect) {
1469414694
unsigned RdxOpcode = RecurrenceDescriptor::getOpcode(Kind);
1469514695
bool IsConstant = isConstant(LHS) && isConstant(RHS);
@@ -14768,7 +14768,7 @@ class HorizontalReduction {
1476814768

1476914769
/// Creates reduction operation with the current opcode with the IR flags
1477014770
/// from \p ReductionOps, dropping nuw/nsw flags.
14771-
static Value *createOp(IRBuilder<> &Builder, RecurKind RdxKind, Value *LHS,
14771+
static Value *createOp(IRBuilderBase &Builder, RecurKind RdxKind, Value *LHS,
1477214772
Value *RHS, const Twine &Name,
1477314773
const ReductionOpsListType &ReductionOps) {
1477414774
bool UseSelect =
@@ -15857,7 +15857,7 @@ class HorizontalReduction {
1585715857
}
1585815858

1585915859
/// Emit a horizontal reduction of the vectorized value.
15860-
Value *emitReduction(Value *VectorizedValue, IRBuilder<> &Builder,
15860+
Value *emitReduction(Value *VectorizedValue, IRBuilderBase &Builder,
1586115861
unsigned ReduxWidth, const TargetTransformInfo *TTI) {
1586215862
assert(VectorizedValue && "Need to have a vectorized tree node");
1586315863
assert(isPowerOf2_32(ReduxWidth) &&

0 commit comments

Comments
 (0)