@@ -101,6 +101,7 @@ class RISCVLiveVariables : public MachineFunctionPass {
101101 void print (raw_ostream &OS, const Module *M = nullptr ) const override ;
102102
103103 void verifyLiveness (MachineFunction &MF) const ;
104+
104105private:
105106 // / Compute local liveness information (Use and Def sets) for each block
106107 void computeLocalLiveness (MachineFunction &MF);
@@ -160,8 +161,8 @@ bool RISCVLiveVariables::isTrackableRegister(
160161}
161162
162163void RISCVLiveVariables::processInstruction (const MachineInstr &MI,
163- LivenessInfo &Info,
164- const TargetRegisterInfo *TRI) {
164+ LivenessInfo &Info,
165+ const TargetRegisterInfo *TRI) {
165166 std::vector<Register> GenVec;
166167 for (const MachineOperand &MO : MI.operands ()) {
167168 if (!MO.isReg () || !MO.getReg ())
@@ -174,7 +175,8 @@ void RISCVLiveVariables::processInstruction(const MachineInstr &MI,
174175 continue ;
175176
176177 if (MO.isUse ()) {
177- // This is a use - only add to Use set if not already defined in this block
178+ // This is a use - only add to Use set if not already defined in this
179+ // block
178180 if (Info.Gen .find (Reg) == Info.Gen .end ()) {
179181 Info.Use .insert (Reg);
180182
@@ -205,8 +207,8 @@ void RISCVLiveVariables::processInstruction(const MachineInstr &MI,
205207 Info.Gen .insert (Reg);
206208 if (Reg.isPhysical ()) {
207209 for (MCSubRegIterator SubRegs (Reg, TRI, /* IncludeSelf=*/ false );
208- SubRegs.isValid (); ++SubRegs) {
209- Info.Gen .insert (*SubRegs);
210+ SubRegs.isValid (); ++SubRegs) {
211+ Info.Gen .insert (*SubRegs);
210212 }
211213 }
212214 }
@@ -324,8 +326,7 @@ void RISCVLiveVariables::computeGlobalLiveness(MachineFunction &MF) {
324326 }
325327}
326328
327- bool RISCVLiveVariables::isLiveAt (Register Reg,
328- const MachineInstr &MI) const {
329+ bool RISCVLiveVariables::isLiveAt (Register Reg, const MachineInstr &MI) const {
329330 const MachineBasicBlock *MBB = MI.getParent ();
330331 auto It = BlockLiveness.find (MBB);
331332
0 commit comments