aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Sema/SemaModule.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@sifive.com>2023-06-25 00:47:56 -0700
committerCraig Topper <craig.topper@sifive.com>2023-06-25 00:47:56 -0700
commit8089bd4bcfea2623e1f9e8e6b7414f2a12e05fa3 (patch)
tree6aa1aee87b6862202fefe644544adad23690c90f /clang/lib/Sema/SemaModule.cpp
parent6fcc562fc76fecee5a3a163a2947d5eff9850fa8 (diff)
downloadllvm-8089bd4bcfea2623e1f9e8e6b7414f2a12e05fa3.zip
llvm-8089bd4bcfea2623e1f9e8e6b7414f2a12e05fa3.tar.gz
llvm-8089bd4bcfea2623e1f9e8e6b7414f2a12e05fa3.tar.bz2
[RISCV] Add GPR bypasses for most scalar integer instructions to the SiFive7 scheduler model.
SiFive7's scalar execution consists of 4 stages AG, M1, M2, WB. Most simple arithmetic and branch instructions can execute in either AG or M2. If the operands are ready, the instruction will execute in the AG stage. Otherwise, it executes in the M2 stage. Everything is fully bypassed, so dependent instructions should only see 1 cycle latency. This patch adds ReadAdvances to pretend that these instructions execute in the M2 ALU and reads their operands then. This allows the scheduler to schedule dependent instructions back to back. I've increased branch latency to 3 since they are also executed in both stages. Still need to fix JALR, but I want to cleanup some scheduler classes first. Multiply, cpop and division instructions can only start in the AG stage. Still need to do some work for FP instructions that produce integer results. I've added an llvm-mca test that creates a long dependency chain. The timeline view can show that things are bypassed. I didn't check all permutations, but we have some variety. Reviewed By: wangpc Differential Revision: https://reviews.llvm.org/D153666
Diffstat (limited to 'clang/lib/Sema/SemaModule.cpp')
0 files changed, 0 insertions, 0 deletions