Skip to content

Commit baf7703

Browse files
author
Chinmay Deshpande
authored
InOrderIssueStage for llvm-mca should be generic over LSUnitBase (#101534)
Other HardwareUnits (such as the [Scheduler](https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/MCA/HardwareUnits/Scheduler.h#L71)) and Stages (such as [RetireStage](https://github.com/llvm/llvm-project/blob/main/llvm/include/llvm/MCA/Stages/RetireStage.h#L32)) are generic over `LSUnitBase` rather than the specialized `LSUnit`.
1 parent 30a4e9e commit baf7703

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

llvm/include/llvm/MCA/Stages/InOrderIssueStage.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
namespace llvm {
2323
namespace mca {
24-
class LSUnit;
24+
class LSUnitBase;
2525
class RegisterFile;
2626

2727
struct StallInfo {
@@ -56,7 +56,7 @@ class InOrderIssueStage final : public Stage {
5656
RegisterFile &PRF;
5757
ResourceManager RM;
5858
CustomBehaviour &CB;
59-
LSUnit &LSU;
59+
LSUnitBase &LSU;
6060

6161
/// Instructions that were issued, but not executed yet.
6262
SmallVector<InstRef, 4> IssuedInst;
@@ -113,7 +113,7 @@ class InOrderIssueStage final : public Stage {
113113

114114
public:
115115
InOrderIssueStage(const MCSubtargetInfo &STI, RegisterFile &PRF,
116-
CustomBehaviour &CB, LSUnit &LSU);
116+
CustomBehaviour &CB, LSUnitBase &LSU);
117117

118118
unsigned getIssueWidth() const;
119119
bool isAvailable(const InstRef &) const override;

llvm/lib/MCA/Stages/InOrderIssueStage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ void StallInfo::cycleEnd() {
4545

4646
InOrderIssueStage::InOrderIssueStage(const MCSubtargetInfo &STI,
4747
RegisterFile &PRF, CustomBehaviour &CB,
48-
LSUnit &LSU)
48+
LSUnitBase &LSU)
4949
: STI(STI), PRF(PRF), RM(STI.getSchedModel()), CB(CB), LSU(LSU),
5050
NumIssued(), CarryOver(), Bandwidth(), LastWriteBackCycle() {}
5151

0 commit comments

Comments
 (0)