[llvm] [llvm][CodeGen] Fixed a bug in stall cycle calculation for window scheduler (PR #99451)
Kai Yan via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 19 07:52:23 PDT 2024
================
@@ -485,15 +485,17 @@ int WindowScheduler::calculateMaxCycle(ScheduleDAGInstrs &DAG,
// ========================================
int WindowScheduler::calculateStallCycle(unsigned Offset, int MaxCycle) {
int MaxStallCycle = 0;
+ int CurrentII = MaxCycle + 1;
----------------
kaiyan96 wrote:
To make the changes in this PR much clear, here is an example of `StallCycle` calculation.
> Without adding `1` to `MaxCycle`, `StallCycle` would be `4` instead of `3`, which is not correct.
![image](https://github.com/user-attachments/assets/fdbb093d-9ae9-4fe5-88e1-20ba8a80fd01)
https://github.com/llvm/llvm-project/pull/99451
More information about the llvm-commits
mailing list