diff options
author | Stanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com> | 2020-01-24 12:02:54 -0800 |
---|---|---|
committer | Stanislav Mekhanoshin <Stanislav.Mekhanoshin@amd.com> | 2020-01-24 12:45:28 -0800 |
commit | be8e38cbd9785d4f4023b88150d14bd815265eef (patch) | |
tree | c6bc81d3033cca5ae2f901a4a6f53b5763a0835b /llvm/lib/CodeGen/MachineScheduler.cpp | |
parent | 9c346464c15c9f42fd641c33ca4c35b31556a661 (diff) | |
download | llvm-be8e38cbd9785d4f4023b88150d14bd815265eef.zip llvm-be8e38cbd9785d4f4023b88150d14bd815265eef.tar.gz llvm-be8e38cbd9785d4f4023b88150d14bd815265eef.tar.bz2 |
Correct NumLoads in clustering
Scheduler sends NumLoads argument into shouldClusterMemOps()
one less the actual cluster length. So for 2 instructions
it will pass just 1. Correct this number.
This is NFC for in tree targets.
Differential Revision: https://reviews.llvm.org/D73292
Diffstat (limited to 'llvm/lib/CodeGen/MachineScheduler.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineScheduler.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineScheduler.cpp b/llvm/lib/CodeGen/MachineScheduler.cpp index 7de1a5f..2bd48ab 100644 --- a/llvm/lib/CodeGen/MachineScheduler.cpp +++ b/llvm/lib/CodeGen/MachineScheduler.cpp @@ -1584,7 +1584,7 @@ void BaseMemOpClusterMutation::clusterNeighboringMemOps( SUnit *SUb = MemOpRecords[Idx+1].SU; if (TII->shouldClusterMemOps(MemOpRecords[Idx].BaseOps, MemOpRecords[Idx + 1].BaseOps, - ClusterLength)) { + ClusterLength + 1)) { if (SUa->NodeNum > SUb->NodeNum) std::swap(SUa, SUb); if (DAG->addEdge(SUb, SDep(SUa, SDep::Cluster))) { |