Skip to content

Commit 6d2e986

Browse files
committed
Remove loop uOp buf size and unused units
Changing processor resources changes llvm-mca output
1 parent 9bff840 commit 6d2e986

File tree

3 files changed

+31
-38
lines changed

3 files changed

+31
-38
lines changed

llvm/lib/Target/RISCV/RISCVSchedTTAscalonD8.td

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,6 @@ def TTAscalonD8Model : SchedMachineModel {
1414
let LoadLatency = 4; // Optimistic load latency
1515
let MispredictPenalty = 14; // Fetch + Decode/Rename/Dispatch + Branch
1616

17-
// Enable partial & runtime unrolling.
18-
let LoopMicroOpBufferSize = 16;
19-
2017
let CompleteModel = 0;
2118

2219
// TODO supported, but haven't added scheduling info yet
@@ -38,7 +35,7 @@ let BufferSize = 16 in {
3835
def AscalonFXC : ProcResource<2>; // ALU, BR
3936
def AscalonFXD : ProcResource<2>; // ALU
4037
def AscalonFP : ProcResource<2>;
41-
def AscalonV : ProcResource<2>;
38+
// TODO two vector units with vector scheduling model
4239
}
4340

4441
def AscalonFX : ProcResGroup<[AscalonFXA, AscalonFXB, AscalonFXC, AscalonFXD]>;

llvm/test/tools/llvm-mca/RISCV/tt-ascalon-d8/fp.s

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -58,24 +58,22 @@ fsqrt.d ft2, fa3
5858
# CHECK-NEXT: [5.0] - AscalonLS
5959
# CHECK-NEXT: [5.1] - AscalonLS
6060
# CHECK-NEXT: [5.2] - AscalonLS
61-
# CHECK-NEXT: [6.0] - AscalonV
62-
# CHECK-NEXT: [6.1] - AscalonV
6361

6462
# CHECK: Resource pressure per iteration:
65-
# CHECK-NEXT: [0.0] [0.1] [1] [2] [3.0] [3.1] [4.0] [4.1] [5.0] [5.1] [5.2] [6.0] [6.1]
66-
# CHECK-NEXT: 18.00 28.00 - - - - - - - - - - -
63+
# CHECK-NEXT: [0.0] [0.1] [1] [2] [3.0] [3.1] [4.0] [4.1] [5.0] [5.1] [5.2]
64+
# CHECK-NEXT: 18.00 28.00 - - - - - - - - -
6765

6866
# CHECK: Resource pressure by instruction:
69-
# CHECK-NEXT: [0.0] [0.1] [1] [2] [3.0] [3.1] [4.0] [4.1] [5.0] [5.1] [5.2] [6.0] [6.1] Instructions:
70-
# CHECK-NEXT: - 1.00 - - - - - - - - - - - fmin.s ft0, fa0, fa1
71-
# CHECK-NEXT: 1.00 - - - - - - - - - - - - fmax.s ft1, fa0, fa1
72-
# CHECK-NEXT: - 1.00 - - - - - - - - - - - fmin.d ft2, ft4, ft5
73-
# CHECK-NEXT: 1.00 - - - - - - - - - - - - fmax.d ft3, ft4, ft5
74-
# CHECK-NEXT: - 1.00 - - - - - - - - - - - fmadd.s fs0, fs0, fs8, fs9
75-
# CHECK-NEXT: 1.00 - - - - - - - - - - - - fmsub.s fs1, fs1, fs8, fs9
76-
# CHECK-NEXT: - 1.00 - - - - - - - - - - - fmul.s fs3, fs3, fs4
77-
# CHECK-NEXT: 7.00 - - - - - - - - - - - - fdiv.s fs2, fs3, fs4
78-
# CHECK-NEXT: 1.00 - - - - - - - - - - - - fmul.d ft4, ft4, ft5
79-
# CHECK-NEXT: - 12.00 - - - - - - - - - - - fdiv.d fs4, fa3, ft5
80-
# CHECK-NEXT: 7.00 - - - - - - - - - - - - fsqrt.s ft1, fa2
81-
# CHECK-NEXT: - 12.00 - - - - - - - - - - - fsqrt.d ft2, fa3
67+
# CHECK-NEXT: [0.0] [0.1] [1] [2] [3.0] [3.1] [4.0] [4.1] [5.0] [5.1] [5.2] Instructions:
68+
# CHECK-NEXT: - 1.00 - - - - - - - - - fmin.s ft0, fa0, fa1
69+
# CHECK-NEXT: 1.00 - - - - - - - - - - fmax.s ft1, fa0, fa1
70+
# CHECK-NEXT: - 1.00 - - - - - - - - - fmin.d ft2, ft4, ft5
71+
# CHECK-NEXT: 1.00 - - - - - - - - - - fmax.d ft3, ft4, ft5
72+
# CHECK-NEXT: - 1.00 - - - - - - - - - fmadd.s fs0, fs0, fs8, fs9
73+
# CHECK-NEXT: 1.00 - - - - - - - - - - fmsub.s fs1, fs1, fs8, fs9
74+
# CHECK-NEXT: - 1.00 - - - - - - - - - fmul.s fs3, fs3, fs4
75+
# CHECK-NEXT: 7.00 - - - - - - - - - - fdiv.s fs2, fs3, fs4
76+
# CHECK-NEXT: 1.00 - - - - - - - - - - fmul.d ft4, ft4, ft5
77+
# CHECK-NEXT: - 12.00 - - - - - - - - - fdiv.d fs4, fa3, ft5
78+
# CHECK-NEXT: 7.00 - - - - - - - - - - fsqrt.s ft1, fa2
79+
# CHECK-NEXT: - 12.00 - - - - - - - - - fsqrt.d ft2, fa3

llvm/test/tools/llvm-mca/RISCV/tt-ascalon-d8/fx.s

Lines changed: 15 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -58,24 +58,22 @@ fcvt.w.s t5, f3
5858
# CHECK-NEXT: [5.0] - AscalonLS
5959
# CHECK-NEXT: [5.1] - AscalonLS
6060
# CHECK-NEXT: [5.2] - AscalonLS
61-
# CHECK-NEXT: [6.0] - AscalonV
62-
# CHECK-NEXT: [6.1] - AscalonV
6361

6462
# CHECK: Resource pressure per iteration:
65-
# CHECK-NEXT: [0.0] [0.1] [1] [2] [3.0] [3.1] [4.0] [4.1] [5.0] [5.1] [5.2] [6.0] [6.1]
66-
# CHECK-NEXT: - - 17.00 1.00 2.00 2.00 1.00 1.00 - - - - -
63+
# CHECK-NEXT: [0.0] [0.1] [1] [2] [3.0] [3.1] [4.0] [4.1] [5.0] [5.1] [5.2]
64+
# CHECK-NEXT: - - 17.00 1.00 2.00 2.00 1.00 1.00 - - -
6765

6866
# CHECK: Resource pressure by instruction:
69-
# CHECK-NEXT: [0.0] [0.1] [1] [2] [3.0] [3.1] [4.0] [4.1] [5.0] [5.1] [5.2] [6.0] [6.1] Instructions:
70-
# CHECK-NEXT: - - 1.00 - - - - - - - - - - mul t0, a0, t0
71-
# CHECK-NEXT: - - - - - - - 1.00 - - - - - sub s2, a2, a3
72-
# CHECK-NEXT: - - 7.00 - - - - - - - - - - div t1, t2, t3
73-
# CHECK-NEXT: - - - - - - 1.00 - - - - - - add t1, a4, gp
74-
# CHECK-NEXT: - - 7.00 - - - - - - - - - - div a1, a2, a3
75-
# CHECK-NEXT: - - - - - 1.00 - - - - - - - add t1, a0, t0
76-
# CHECK-NEXT: - - 1.00 - - - - - - - - - - mul s0, s0, a5
77-
# CHECK-NEXT: - - - - - 1.00 - - - - - - - add t2, t2, t2
78-
# CHECK-NEXT: - - - - 1.00 - - - - - - - - sub s1, s0, s1
79-
# CHECK-NEXT: - - - 1.00 - - - - - - - - - fcvt.s.w ft1, t3
80-
# CHECK-NEXT: - - - - 1.00 - - - - - - - - add s2, s2, s2
81-
# CHECK-NEXT: - - 1.00 - - - - - - - - - - fcvt.w.s t5, ft3
67+
# CHECK-NEXT: [0.0] [0.1] [1] [2] [3.0] [3.1] [4.0] [4.1] [5.0] [5.1] [5.2] Instructions:
68+
# CHECK-NEXT: - - 1.00 - - - - - - - - mul t0, a0, t0
69+
# CHECK-NEXT: - - - - - - - 1.00 - - - sub s2, a2, a3
70+
# CHECK-NEXT: - - 7.00 - - - - - - - - div t1, t2, t3
71+
# CHECK-NEXT: - - - - - - 1.00 - - - - add t1, a4, gp
72+
# CHECK-NEXT: - - 7.00 - - - - - - - - div a1, a2, a3
73+
# CHECK-NEXT: - - - - - 1.00 - - - - - add t1, a0, t0
74+
# CHECK-NEXT: - - 1.00 - - - - - - - - mul s0, s0, a5
75+
# CHECK-NEXT: - - - - - 1.00 - - - - - add t2, t2, t2
76+
# CHECK-NEXT: - - - - 1.00 - - - - - - sub s1, s0, s1
77+
# CHECK-NEXT: - - - 1.00 - - - - - - - fcvt.s.w ft1, t3
78+
# CHECK-NEXT: - - - - 1.00 - - - - - - add s2, s2, s2
79+
# CHECK-NEXT: - - 1.00 - - - - - - - - fcvt.w.s t5, ft3

0 commit comments

Comments
 (0)