21
21
22
22
#define DEBUG_TYPE " llvm-mca-riscv-custombehaviour"
23
23
24
- namespace llvm ::RISCV::mca {
24
+ namespace llvm ::RISCV {
25
25
struct VXMemOpInfo {
26
26
unsigned Log2IdxEEW : 3 ;
27
27
unsigned IsOrdered : 1 ;
@@ -31,14 +31,8 @@ struct VXMemOpInfo {
31
31
};
32
32
33
33
#define GET_RISCVBaseVXMemOpTable_IMPL
34
- // We need to include the implementation code here because RISCVCustomBehavior
35
- // is not linked against RISCVCodeGen.
36
- #define GET_RISCVVLXSEGTable_IMPL
37
- #define GET_RISCVVSXSEGTable_IMPL
38
- #define GET_RISCVVLXTable_IMPL
39
- #define GET_RISCVVSXTable_IMPL
40
34
#include " RISCVGenSearchableTables.inc"
41
- } // namespace llvm::RISCV::mca
35
+ } // namespace llvm::RISCV
42
36
43
37
namespace llvm {
44
38
namespace mca {
@@ -268,35 +262,35 @@ unsigned RISCVInstrumentManager::getSchedClassID(
268
262
uint8_t SEW = SI ? SI->getSEW () : 0 ;
269
263
270
264
std::optional<unsigned > VPOpcode;
271
- if (const auto *VXMO = RISCV::mca:: getVXMemOpInfo (Opcode)) {
265
+ if (const auto *VXMO = RISCV::getVXMemOpInfo (Opcode)) {
272
266
// Calculate the expected index EMUL. For indexed operations,
273
267
// the DataEEW and DataEMUL are equal to SEW and LMUL, respectively.
274
268
unsigned IndexEMUL = ((1 << VXMO->Log2IdxEEW ) * LMUL) / SEW;
275
269
276
270
if (!VXMO->NF ) {
277
271
// Indexed Load / Store.
278
272
if (VXMO->IsStore ) {
279
- if (const auto *VXP = RISCV::mca:: getVSXPseudo (
273
+ if (const auto *VXP = RISCV::getVSXPseudo (
280
274
/* Masked=*/ 0 , VXMO->IsOrdered , VXMO->Log2IdxEEW , LMUL,
281
275
IndexEMUL))
282
276
VPOpcode = VXP->Pseudo ;
283
277
} else {
284
- if (const auto *VXP = RISCV::mca:: getVLXPseudo (
278
+ if (const auto *VXP = RISCV::getVLXPseudo (
285
279
/* Masked=*/ 0 , VXMO->IsOrdered , VXMO->Log2IdxEEW , LMUL,
286
280
IndexEMUL))
287
281
VPOpcode = VXP->Pseudo ;
288
282
}
289
283
} else {
290
284
// Segmented Indexed Load / Store.
291
285
if (VXMO->IsStore ) {
292
- if (const auto *VXP = RISCV::mca::getVSXSEGPseudo (
293
- VXMO->NF , /* Masked=*/ 0 , VXMO->IsOrdered , VXMO-> Log2IdxEEW , LMUL ,
294
- IndexEMUL))
286
+ if (const auto *VXP =
287
+ RISCV::getVSXSEGPseudo ( VXMO->NF , /* Masked=*/ 0 , VXMO->IsOrdered ,
288
+ VXMO-> Log2IdxEEW , LMUL, IndexEMUL))
295
289
VPOpcode = VXP->Pseudo ;
296
290
} else {
297
- if (const auto *VXP = RISCV::mca::getVLXSEGPseudo (
298
- VXMO->NF , /* Masked=*/ 0 , VXMO->IsOrdered , VXMO-> Log2IdxEEW , LMUL ,
299
- IndexEMUL))
291
+ if (const auto *VXP =
292
+ RISCV::getVLXSEGPseudo ( VXMO->NF , /* Masked=*/ 0 , VXMO->IsOrdered ,
293
+ VXMO-> Log2IdxEEW , LMUL, IndexEMUL))
300
294
VPOpcode = VXP->Pseudo ;
301
295
}
302
296
}
0 commit comments