Skip to content

Commit fb306f5

Browse files
committed
Added missing namespace comment and some formatting (NFC).
1 parent 0a7a527 commit fb306f5

File tree

1 file changed

+91
-91
lines changed

1 file changed

+91
-91
lines changed

llvm/lib/CodeGen/PostRASchedulerList.cpp

Lines changed: 91 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -73,120 +73,120 @@ DebugMod("postra-sched-debugmod",
7373
AntiDepBreaker::~AntiDepBreaker() = default;
7474

7575
namespace {
76-
class PostRAScheduler : public MachineFunctionPass {
77-
const TargetInstrInfo *TII = nullptr;
78-
RegisterClassInfo RegClassInfo;
79-
80-
public:
81-
static char ID;
82-
PostRAScheduler() : MachineFunctionPass(ID) {}
83-
84-
void getAnalysisUsage(AnalysisUsage &AU) const override {
85-
AU.setPreservesCFG();
86-
AU.addRequired<AAResultsWrapperPass>();
87-
AU.addRequired<TargetPassConfig>();
88-
AU.addRequired<MachineDominatorTreeWrapperPass>();
89-
AU.addPreserved<MachineDominatorTreeWrapperPass>();
90-
AU.addRequired<MachineLoopInfoWrapperPass>();
91-
AU.addPreserved<MachineLoopInfoWrapperPass>();
92-
MachineFunctionPass::getAnalysisUsage(AU);
93-
}
76+
class PostRAScheduler : public MachineFunctionPass {
77+
const TargetInstrInfo *TII = nullptr;
78+
RegisterClassInfo RegClassInfo;
79+
80+
public:
81+
static char ID;
82+
PostRAScheduler() : MachineFunctionPass(ID) {}
83+
84+
void getAnalysisUsage(AnalysisUsage &AU) const override {
85+
AU.setPreservesCFG();
86+
AU.addRequired<AAResultsWrapperPass>();
87+
AU.addRequired<TargetPassConfig>();
88+
AU.addRequired<MachineDominatorTreeWrapperPass>();
89+
AU.addPreserved<MachineDominatorTreeWrapperPass>();
90+
AU.addRequired<MachineLoopInfoWrapperPass>();
91+
AU.addPreserved<MachineLoopInfoWrapperPass>();
92+
MachineFunctionPass::getAnalysisUsage(AU);
93+
}
9494

95-
MachineFunctionProperties getRequiredProperties() const override {
96-
return MachineFunctionProperties().set(
97-
MachineFunctionProperties::Property::NoVRegs);
98-
}
95+
MachineFunctionProperties getRequiredProperties() const override {
96+
return MachineFunctionProperties().set(
97+
MachineFunctionProperties::Property::NoVRegs);
98+
}
9999

100-
bool runOnMachineFunction(MachineFunction &Fn) override;
101-
};
102-
char PostRAScheduler::ID = 0;
100+
bool runOnMachineFunction(MachineFunction &Fn) override;
101+
};
103102

104-
class SchedulePostRATDList : public ScheduleDAGInstrs {
105-
/// AvailableQueue - The priority queue to use for the available SUnits.
106-
///
107-
LatencyPriorityQueue AvailableQueue;
103+
char PostRAScheduler::ID = 0;
108104

109-
/// PendingQueue - This contains all of the instructions whose operands have
110-
/// been issued, but their results are not ready yet (due to the latency of
111-
/// the operation). Once the operands becomes available, the instruction is
112-
/// added to the AvailableQueue.
113-
std::vector<SUnit*> PendingQueue;
105+
class SchedulePostRATDList : public ScheduleDAGInstrs {
106+
/// AvailableQueue - The priority queue to use for the available SUnits.
107+
///
108+
LatencyPriorityQueue AvailableQueue;
114109

115-
/// HazardRec - The hazard recognizer to use.
116-
ScheduleHazardRecognizer *HazardRec;
110+
/// PendingQueue - This contains all of the instructions whose operands have
111+
/// been issued, but their results are not ready yet (due to the latency of
112+
/// the operation). Once the operands becomes available, the instruction is
113+
/// added to the AvailableQueue.
114+
std::vector<SUnit *> PendingQueue;
117115

118-
/// AntiDepBreak - Anti-dependence breaking object, or NULL if none
119-
AntiDepBreaker *AntiDepBreak;
116+
/// HazardRec - The hazard recognizer to use.
117+
ScheduleHazardRecognizer *HazardRec;
120118

121-
/// AA - AliasAnalysis for making memory reference queries.
122-
AliasAnalysis *AA;
119+
/// AntiDepBreak - Anti-dependence breaking object, or NULL if none
120+
AntiDepBreaker *AntiDepBreak;
123121

124-
/// The schedule. Null SUnit*'s represent noop instructions.
125-
std::vector<SUnit*> Sequence;
122+
/// AA - AliasAnalysis for making memory reference queries.
123+
AliasAnalysis *AA;
126124

127-
/// Ordered list of DAG postprocessing steps.
128-
std::vector<std::unique_ptr<ScheduleDAGMutation>> Mutations;
125+
/// The schedule. Null SUnit*'s represent noop instructions.
126+
std::vector<SUnit *> Sequence;
129127

130-
/// The index in BB of RegionEnd.
131-
///
132-
/// This is the instruction number from the top of the current block, not
133-
/// the SlotIndex. It is only used by the AntiDepBreaker.
134-
unsigned EndIndex = 0;
128+
/// Ordered list of DAG postprocessing steps.
129+
std::vector<std::unique_ptr<ScheduleDAGMutation>> Mutations;
135130

136-
public:
137-
SchedulePostRATDList(
138-
MachineFunction &MF, MachineLoopInfo &MLI, AliasAnalysis *AA,
139-
const RegisterClassInfo &,
140-
TargetSubtargetInfo::AntiDepBreakMode AntiDepMode,
141-
SmallVectorImpl<const TargetRegisterClass *> &CriticalPathRCs);
131+
/// The index in BB of RegionEnd.
132+
///
133+
/// This is the instruction number from the top of the current block, not
134+
/// the SlotIndex. It is only used by the AntiDepBreaker.
135+
unsigned EndIndex = 0;
142136

143-
~SchedulePostRATDList() override;
137+
public:
138+
SchedulePostRATDList(
139+
MachineFunction &MF, MachineLoopInfo &MLI, AliasAnalysis *AA,
140+
const RegisterClassInfo &,
141+
TargetSubtargetInfo::AntiDepBreakMode AntiDepMode,
142+
SmallVectorImpl<const TargetRegisterClass *> &CriticalPathRCs);
144143

145-
/// startBlock - Initialize register live-range state for scheduling in
146-
/// this block.
147-
///
148-
void startBlock(MachineBasicBlock *BB) override;
144+
~SchedulePostRATDList() override;
149145

150-
// Set the index of RegionEnd within the current BB.
151-
void setEndIndex(unsigned EndIdx) { EndIndex = EndIdx; }
146+
/// startBlock - Initialize register live-range state for scheduling in
147+
/// this block.
148+
///
149+
void startBlock(MachineBasicBlock *BB) override;
152150

153-
/// Initialize the scheduler state for the next scheduling region.
154-
void enterRegion(MachineBasicBlock *bb,
155-
MachineBasicBlock::iterator begin,
156-
MachineBasicBlock::iterator end,
157-
unsigned regioninstrs) override;
151+
// Set the index of RegionEnd within the current BB.
152+
void setEndIndex(unsigned EndIdx) { EndIndex = EndIdx; }
158153

159-
/// Notify that the scheduler has finished scheduling the current region.
160-
void exitRegion() override;
154+
/// Initialize the scheduler state for the next scheduling region.
155+
void enterRegion(MachineBasicBlock *bb, MachineBasicBlock::iterator begin,
156+
MachineBasicBlock::iterator end,
157+
unsigned regioninstrs) override;
161158

162-
/// Schedule - Schedule the instruction range using list scheduling.
163-
///
164-
void schedule() override;
159+
/// Notify that the scheduler has finished scheduling the current region.
160+
void exitRegion() override;
165161

166-
void EmitSchedule();
162+
/// Schedule - Schedule the instruction range using list scheduling.
163+
///
164+
void schedule() override;
167165

168-
/// Observe - Update liveness information to account for the current
169-
/// instruction, which will not be scheduled.
170-
///
171-
void Observe(MachineInstr &MI, unsigned Count);
166+
void EmitSchedule();
172167

173-
/// finishBlock - Clean up register live-range state.
174-
///
175-
void finishBlock() override;
168+
/// Observe - Update liveness information to account for the current
169+
/// instruction, which will not be scheduled.
170+
///
171+
void Observe(MachineInstr &MI, unsigned Count);
176172

177-
private:
178-
/// Apply each ScheduleDAGMutation step in order.
179-
void postProcessDAG();
173+
/// finishBlock - Clean up register live-range state.
174+
///
175+
void finishBlock() override;
180176

181-
void ReleaseSucc(SUnit *SU, SDep *SuccEdge);
182-
void ReleaseSuccessors(SUnit *SU);
183-
void ScheduleNodeTopDown(SUnit *SU, unsigned CurCycle);
184-
void ListScheduleTopDown();
177+
private:
178+
/// Apply each ScheduleDAGMutation step in order.
179+
void postProcessDAG();
185180

186-
void dumpSchedule() const;
187-
void emitNoop(unsigned CurCycle);
188-
};
189-
}
181+
void ReleaseSucc(SUnit *SU, SDep *SuccEdge);
182+
void ReleaseSuccessors(SUnit *SU);
183+
void ScheduleNodeTopDown(SUnit *SU, unsigned CurCycle);
184+
void ListScheduleTopDown();
185+
186+
void dumpSchedule() const;
187+
void emitNoop(unsigned CurCycle);
188+
};
189+
} // namespace
190190

191191
char &llvm::PostRASchedulerID = PostRAScheduler::ID;
192192

0 commit comments

Comments
 (0)