Skip to content

Commit a044209

Browse files
committed
VPlan/Builder: refine return types (NFC)
1 parent b592917 commit a044209

File tree

1 file changed

+14
-13
lines changed

1 file changed

+14
-13
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorizationPlanner.h

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -164,33 +164,34 @@ class VPBuilder {
164164
return tryInsertInstruction(
165165
new VPInstruction(Opcode, Operands, WrapFlags, DL, Name));
166166
}
167-
VPValue *createNot(VPValue *Operand, DebugLoc DL = {},
168-
const Twine &Name = "") {
167+
VPInstruction *createNot(VPValue *Operand, DebugLoc DL = {},
168+
const Twine &Name = "") {
169169
return createInstruction(VPInstruction::Not, {Operand}, DL, Name);
170170
}
171171

172-
VPValue *createAnd(VPValue *LHS, VPValue *RHS, DebugLoc DL = {},
173-
const Twine &Name = "") {
172+
VPInstruction *createAnd(VPValue *LHS, VPValue *RHS, DebugLoc DL = {},
173+
const Twine &Name = "") {
174174
return createInstruction(Instruction::BinaryOps::And, {LHS, RHS}, DL, Name);
175175
}
176176

177-
VPValue *createOr(VPValue *LHS, VPValue *RHS, DebugLoc DL = {},
178-
const Twine &Name = "") {
177+
VPInstruction *createOr(VPValue *LHS, VPValue *RHS, DebugLoc DL = {},
178+
const Twine &Name = "") {
179179

180180
return tryInsertInstruction(new VPInstruction(
181181
Instruction::BinaryOps::Or, {LHS, RHS},
182182
VPRecipeWithIRFlags::DisjointFlagsTy(false), DL, Name));
183183
}
184184

185-
VPValue *createLogicalAnd(VPValue *LHS, VPValue *RHS, DebugLoc DL = {},
186-
const Twine &Name = "") {
185+
VPInstruction *createLogicalAnd(VPValue *LHS, VPValue *RHS, DebugLoc DL = {},
186+
const Twine &Name = "") {
187187
return tryInsertInstruction(
188188
new VPInstruction(VPInstruction::LogicalAnd, {LHS, RHS}, DL, Name));
189189
}
190190

191-
VPValue *createSelect(VPValue *Cond, VPValue *TrueVal, VPValue *FalseVal,
192-
DebugLoc DL = {}, const Twine &Name = "",
193-
std::optional<FastMathFlags> FMFs = std::nullopt) {
191+
VPInstruction *
192+
createSelect(VPValue *Cond, VPValue *TrueVal, VPValue *FalseVal,
193+
DebugLoc DL = {}, const Twine &Name = "",
194+
std::optional<FastMathFlags> FMFs = std::nullopt) {
194195
auto *Select =
195196
FMFs ? new VPInstruction(Instruction::Select, {Cond, TrueVal, FalseVal},
196197
*FMFs, DL, Name)
@@ -202,8 +203,8 @@ class VPBuilder {
202203
/// Create a new ICmp VPInstruction with predicate \p Pred and operands \p A
203204
/// and \p B.
204205
/// TODO: add createFCmp when needed.
205-
VPValue *createICmp(CmpInst::Predicate Pred, VPValue *A, VPValue *B,
206-
DebugLoc DL = {}, const Twine &Name = "") {
206+
VPInstruction *createICmp(CmpInst::Predicate Pred, VPValue *A, VPValue *B,
207+
DebugLoc DL = {}, const Twine &Name = "") {
207208
assert(Pred >= CmpInst::FIRST_ICMP_PREDICATE &&
208209
Pred <= CmpInst::LAST_ICMP_PREDICATE && "invalid predicate");
209210
return tryInsertInstruction(

0 commit comments

Comments
 (0)