Skip to content

Commit b936ef1

Browse files
authored
[RISCV] Reorder include of RISCVInstrInfoZi* before C and Zc*. NFC (llvm#131274)
Zclsd needs to reference Zilsd in CompressPats so put Zi before Zc. The one issue I encountered is that RISCVInstrFormatsC.td needs to be included before RISCVInstrInfoZicfiss. To fix this I moved the include of RISCVInstrFormatsC.td from RISCVInstrInfoC.td to RISCVInstrInfo.td where we include RISCVInstrFormats.td. I moved RISCVInstrFormatsV.td for consistency.
1 parent 8c31bb7 commit b936ef1

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

llvm/lib/Target/RISCV/RISCVInstrInfo.td

+7-5
Original file line numberDiff line numberDiff line change
@@ -518,6 +518,8 @@ def LeadingOnesWMask : ImmLeaf<XLenVT, [{
518518
//===----------------------------------------------------------------------===//
519519

520520
include "RISCVInstrFormats.td"
521+
include "RISCVInstrFormatsC.td"
522+
include "RISCVInstrFormatsV.td"
521523

522524
//===----------------------------------------------------------------------===//
523525
// Instruction Class Templates
@@ -2135,17 +2137,17 @@ include "RISCVInstrInfoZk.td"
21352137
include "RISCVInstrInfoV.td"
21362138
include "RISCVInstrInfoZvk.td"
21372139

2138-
// Compressed
2139-
include "RISCVInstrInfoC.td"
2140-
include "RISCVInstrInfoZc.td"
2141-
include "RISCVInstrInfoZcmop.td"
2142-
21432140
// Integer
21442141
include "RISCVInstrInfoZimop.td"
21452142
include "RISCVInstrInfoZicbo.td"
21462143
include "RISCVInstrInfoZicond.td"
21472144
include "RISCVInstrInfoZicfiss.td"
21482145

2146+
// Compressed
2147+
include "RISCVInstrInfoC.td"
2148+
include "RISCVInstrInfoZc.td"
2149+
include "RISCVInstrInfoZcmop.td"
2150+
21492151
//===----------------------------------------------------------------------===//
21502152
// Vendor extensions
21512153
//===----------------------------------------------------------------------===//

llvm/lib/Target/RISCV/RISCVInstrInfoC.td

-2
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
include "RISCVInstrFormatsC.td"
10-
119
//===----------------------------------------------------------------------===//
1210
// Operand definitions.
1311
//===----------------------------------------------------------------------===//

llvm/lib/Target/RISCV/RISCVInstrInfoV.td

-2
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
///
1212
//===----------------------------------------------------------------------===//
1313

14-
include "RISCVInstrFormatsV.td"
15-
1614
//===----------------------------------------------------------------------===//
1715
// Operand and SDNode transformation definitions.
1816
//===----------------------------------------------------------------------===//

0 commit comments

Comments
 (0)