Skip to content

Commit 632d9fe

Browse files
committed
VPlan/Builder: refine return types (NFC)
1 parent c1ac87b commit 632d9fe

File tree

1 file changed

+23
-23
lines changed

1 file changed

+23
-23
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -190,37 +190,37 @@ class VPBuilder {
190190
new VPInstruction(Opcode, Operands, WrapFlags, DL, Name));
191191
}
192192

193-
VPValue *createNot(VPValue *Operand, DebugLoc DL = DebugLoc::getUnknown(),
194-
const Twine &Name = "") {
193+
VPInstruction *createNot(VPValue *Operand, DebugLoc DL = DebugLoc::getUnknown(),
194+
const Twine &Name = "") {
195195
return createInstruction(VPInstruction::Not, {Operand}, DL, Name);
196196
}
197197

198-
VPValue *createAnd(VPValue *LHS, VPValue *RHS,
199-
DebugLoc DL = DebugLoc::getUnknown(),
200-
const Twine &Name = "") {
198+
VPInstruction *createAnd(VPValue *LHS, VPValue *RHS,
199+
DebugLoc DL = DebugLoc::getUnknown(),
200+
const Twine &Name = "") {
201201
return createInstruction(Instruction::BinaryOps::And, {LHS, RHS}, DL, Name);
202202
}
203203

204-
VPValue *createOr(VPValue *LHS, VPValue *RHS,
205-
DebugLoc DL = DebugLoc::getUnknown(),
206-
const Twine &Name = "") {
204+
VPInstruction *createOr(VPValue *LHS, VPValue *RHS,
205+
DebugLoc DL = DebugLoc::getUnknown(),
206+
const Twine &Name = "") {
207207

208208
return tryInsertInstruction(new VPInstruction(
209209
Instruction::BinaryOps::Or, {LHS, RHS},
210210
VPRecipeWithIRFlags::DisjointFlagsTy(false), DL, Name));
211211
}
212212

213-
VPValue *createLogicalAnd(VPValue *LHS, VPValue *RHS,
214-
DebugLoc DL = DebugLoc::getUnknown(),
215-
const Twine &Name = "") {
213+
VPInstruction *createLogicalAnd(VPValue *LHS, VPValue *RHS,
214+
DebugLoc DL = DebugLoc::getUnknown(),
215+
const Twine &Name = "") {
216216
return tryInsertInstruction(
217217
new VPInstruction(VPInstruction::LogicalAnd, {LHS, RHS}, DL, Name));
218218
}
219219

220-
VPValue *createSelect(VPValue *Cond, VPValue *TrueVal, VPValue *FalseVal,
221-
DebugLoc DL = DebugLoc::getUnknown(),
222-
const Twine &Name = "",
223-
std::optional<FastMathFlags> FMFs = std::nullopt) {
220+
VPInstruction *
221+
createSelect(VPValue *Cond, VPValue *TrueVal, VPValue *FalseVal,
222+
DebugLoc DL = DebugLoc::getUnknown(), const Twine &Name = "",
223+
std::optional<FastMathFlags> FMFs = std::nullopt) {
224224
auto *Select =
225225
FMFs ? new VPInstruction(Instruction::Select, {Cond, TrueVal, FalseVal},
226226
*FMFs, DL, Name)
@@ -232,9 +232,9 @@ class VPBuilder {
232232
/// Create a new ICmp VPInstruction with predicate \p Pred and operands \p A
233233
/// and \p B.
234234
/// TODO: add createFCmp when needed.
235-
VPValue *createICmp(CmpInst::Predicate Pred, VPValue *A, VPValue *B,
236-
DebugLoc DL = DebugLoc::getUnknown(),
237-
const Twine &Name = "") {
235+
VPInstruction *createICmp(CmpInst::Predicate Pred, VPValue *A, VPValue *B,
236+
DebugLoc DL = DebugLoc::getUnknown(),
237+
const Twine &Name = "") {
238238
assert(Pred >= CmpInst::FIRST_ICMP_PREDICATE &&
239239
Pred <= CmpInst::LAST_ICMP_PREDICATE && "invalid predicate");
240240
return tryInsertInstruction(
@@ -248,16 +248,16 @@ class VPBuilder {
248248
new VPInstruction(VPInstruction::PtrAdd, {Ptr, Offset},
249249
GEPNoWrapFlags::none(), DL, Name));
250250
}
251-
VPValue *createInBoundsPtrAdd(VPValue *Ptr, VPValue *Offset,
252-
DebugLoc DL = DebugLoc::getUnknown(),
253-
const Twine &Name = "") {
251+
VPInstruction *createInBoundsPtrAdd(VPValue *Ptr, VPValue *Offset,
252+
DebugLoc DL = DebugLoc::getUnknown(),
253+
const Twine &Name = "") {
254254
return tryInsertInstruction(
255255
new VPInstruction(VPInstruction::PtrAdd, {Ptr, Offset},
256256
GEPNoWrapFlags::inBounds(), DL, Name));
257257
}
258258

259-
VPInstruction *createScalarPhi(ArrayRef<VPValue *> IncomingValues,
260-
DebugLoc DL, const Twine &Name = "") {
259+
VPPhi *createScalarPhi(ArrayRef<VPValue *> IncomingValues, DebugLoc DL,
260+
const Twine &Name = "") {
261261
return tryInsertInstruction(new VPPhi(IncomingValues, DL, Name));
262262
}
263263

0 commit comments

Comments
 (0)