@@ -34,7 +34,7 @@ static cl::opt<unsigned> SLPMaxVF(
34
34
" exclusively by SLP vectorizer." ),
35
35
cl::Hidden);
36
36
37
- InstructionCost RISCVTTIImpl::getLMULCost (MVT VT) {
37
+ InstructionCost RISCVTTIImpl::getLMULCost (MVT VT) const {
38
38
// TODO: Here assume reciprocal throughput is 1 for LMUL_1, it is
39
39
// implementation-defined.
40
40
if (!VT.isVector ())
@@ -266,22 +266,22 @@ static VectorType *getVRGatherIndexType(MVT DataVT, const RISCVSubtarget &ST,
266
266
// / Return the cost of a vrgather.vv instruction for the type VT. vrgather.vv
267
267
// / is generally quadratic in the number of vreg implied by LMUL. Note that
268
268
// / operand (index and possibly mask) are handled separately.
269
- InstructionCost RISCVTTIImpl::getVRGatherVVCost (MVT VT) {
269
+ InstructionCost RISCVTTIImpl::getVRGatherVVCost (MVT VT) const {
270
270
return getLMULCost (VT) * getLMULCost (VT);
271
271
}
272
272
273
273
// / Return the cost of a vrgather.vi (or vx) instruction for the type VT.
274
274
// / vrgather.vi/vx may be linear in the number of vregs implied by LMUL,
275
275
// / or may track the vrgather.vv cost. It is implementation-dependent.
276
- InstructionCost RISCVTTIImpl::getVRGatherVICost (MVT VT) {
276
+ InstructionCost RISCVTTIImpl::getVRGatherVICost (MVT VT) const {
277
277
return getLMULCost (VT);
278
278
}
279
279
280
280
// / Return the cost of a vslidedown.vi/vx or vslideup.vi/vx instruction
281
281
// / for the type VT. (This does not cover the vslide1up or vslide1down
282
282
// / variants.) Slides may be linear in the number of vregs implied by LMUL,
283
283
// / or may track the vrgather.vv cost. It is implementation-dependent.
284
- InstructionCost RISCVTTIImpl::getVSlideCost (MVT VT) {
284
+ InstructionCost RISCVTTIImpl::getVSlideCost (MVT VT) const {
285
285
return getLMULCost (VT);
286
286
}
287
287
0 commit comments