aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Law <jlaw@ventanamicro.com>2024-03-31 10:51:17 -0600
committerJeff Law <jlaw@ventanamicro.com>2024-03-31 10:51:17 -0600
commit08eaafadd5beaa56beb2d1fceca9f97eeb0219ba (patch)
tree72d1b855eb8ac6ef43884660133e97e7e1edc218
parentb313baba57f7e09f66b603e1e30dd4b48800693f (diff)
downloadgcc-08eaafadd5beaa56beb2d1fceca9f97eeb0219ba.zip
gcc-08eaafadd5beaa56beb2d1fceca9f97eeb0219ba.tar.gz
gcc-08eaafadd5beaa56beb2d1fceca9f97eeb0219ba.tar.bz2
[committed] RISC-V: Add missing insn types to XiangShan Nanhu scheduler model
The test for the recently added XiangShan Nanhu microarchitecture is failing because the scheduler description does not have entries for certain insn types. I'm adding branch, jalr, ret and sfb_alu to the scheduler description, that's enough to get the trivial test to pass. However, I strongly suspect running any significant code through the compiler when scheduling for this microarchitecture will trigger faults. Basically we have checking now that will fault if we have an insn in the IL without an associated type or if we have an insn in the IL that does not map to an insn reservation in the scheduler model. We were tripping the latter assertion for one of those branch types. My suspicion is many insn types aren't handled by that DFA. The branch insns were pretty obvious and easy to fix. But someone with more experience with the uarch needs to do an audit to ensure that all insn types map to an insn reservation. gcc/ * config/riscv/xiangshan.md (xiangshan_jump): Add branch, jalr, ret and sfb_alu.
-rw-r--r--gcc/config/riscv/xiangshan.md2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/config/riscv/xiangshan.md b/gcc/config/riscv/xiangshan.md
index 381c3ce..76539d3 100644
--- a/gcc/config/riscv/xiangshan.md
+++ b/gcc/config/riscv/xiangshan.md
@@ -70,7 +70,7 @@
(define_insn_reservation "xiangshan_jump" 1
(and (eq_attr "tune" "xiangshan")
- (eq_attr "type" "jump,call,auipc,unknown"))
+ (eq_attr "type" "jump,call,auipc,unknown,branch,jalr,ret,sfb_alu"))
"xs_jmp_rs")
(define_insn_reservation "xiangshan_i2f" 3