@@ -176,26 +176,25 @@ class ReachingDefAnalysis : public MachineFunctionPass {
176
176
void traverse ();
177
177
178
178
// / Provides the instruction id of the closest reaching def instruction of
179
- // / PhysReg that reaches MI, relative to the begining of MI's basic block.
180
- int getReachingDef (MachineInstr *MI, MCRegister PhysReg ) const ;
179
+ // / Reg that reaches MI, relative to the begining of MI's basic block.
180
+ int getReachingDef (MachineInstr *MI, MCRegister Reg ) const ;
181
181
182
- // / Return whether A and B use the same def of PhysReg .
182
+ // / Return whether A and B use the same def of Reg .
183
183
bool hasSameReachingDef (MachineInstr *A, MachineInstr *B,
184
- MCRegister PhysReg ) const ;
184
+ MCRegister Reg ) const ;
185
185
186
186
// / Return whether the reaching def for MI also is live out of its parent
187
187
// / block.
188
- bool isReachingDefLiveOut (MachineInstr *MI, MCRegister PhysReg ) const ;
188
+ bool isReachingDefLiveOut (MachineInstr *MI, MCRegister Reg ) const ;
189
189
190
- // / Return the local MI that produces the live out value for PhysReg , or
190
+ // / Return the local MI that produces the live out value for Reg , or
191
191
// / nullptr for a non-live out or non-local def.
192
192
MachineInstr *getLocalLiveOutMIDef (MachineBasicBlock *MBB,
193
- MCRegister PhysReg ) const ;
193
+ MCRegister Reg ) const ;
194
194
195
195
// / If a single MachineInstr creates the reaching definition, then return it.
196
196
// / Otherwise return null.
197
- MachineInstr *getUniqueReachingMIDef (MachineInstr *MI,
198
- MCRegister PhysReg) const ;
197
+ MachineInstr *getUniqueReachingMIDef (MachineInstr *MI, MCRegister Reg) const ;
199
198
200
199
// / If a single MachineInstr creates the reaching definition, for MIs operand
201
200
// / at Idx, then return it. Otherwise return null.
@@ -207,44 +206,43 @@ class ReachingDefAnalysis : public MachineFunctionPass {
207
206
208
207
// / Provide whether the register has been defined in the same basic block as,
209
208
// / and before, MI.
210
- bool hasLocalDefBefore (MachineInstr *MI, MCRegister PhysReg ) const ;
209
+ bool hasLocalDefBefore (MachineInstr *MI, MCRegister Reg ) const ;
211
210
212
211
// / Return whether the given register is used after MI, whether it's a local
213
212
// / use or a live out.
214
- bool isRegUsedAfter (MachineInstr *MI, MCRegister PhysReg ) const ;
213
+ bool isRegUsedAfter (MachineInstr *MI, MCRegister Reg ) const ;
215
214
216
215
// / Return whether the given register is defined after MI.
217
- bool isRegDefinedAfter (MachineInstr *MI, MCRegister PhysReg ) const ;
216
+ bool isRegDefinedAfter (MachineInstr *MI, MCRegister Reg ) const ;
218
217
219
218
// / Provides the clearance - the number of instructions since the closest
220
- // / reaching def instuction of PhysReg that reaches MI.
221
- int getClearance (MachineInstr *MI, MCRegister PhysReg ) const ;
219
+ // / reaching def instuction of Reg that reaches MI.
220
+ int getClearance (MachineInstr *MI, MCRegister Reg ) const ;
222
221
223
222
// / Provides the uses, in the same block as MI, of register that MI defines.
224
223
// / This does not consider live-outs.
225
- void getReachingLocalUses (MachineInstr *MI, MCRegister PhysReg ,
224
+ void getReachingLocalUses (MachineInstr *MI, MCRegister Reg ,
226
225
InstSet &Uses) const ;
227
226
228
- // / Search MBB for a definition of PhysReg and insert it into Defs. If no
227
+ // / Search MBB for a definition of Reg and insert it into Defs. If no
229
228
// / definition is found, recursively search the predecessor blocks for them.
230
- void getLiveOuts (MachineBasicBlock *MBB, MCRegister PhysReg , InstSet &Defs,
229
+ void getLiveOuts (MachineBasicBlock *MBB, MCRegister Reg , InstSet &Defs,
231
230
BlockSet &VisitedBBs) const ;
232
- void getLiveOuts (MachineBasicBlock *MBB, MCRegister PhysReg,
233
- InstSet &Defs) const ;
231
+ void getLiveOuts (MachineBasicBlock *MBB, MCRegister Reg, InstSet &Defs) const ;
234
232
235
233
// / For the given block, collect the instructions that use the live-in
236
234
// / value of the provided register. Return whether the value is still
237
235
// / live on exit.
238
- bool getLiveInUses (MachineBasicBlock *MBB, MCRegister PhysReg ,
236
+ bool getLiveInUses (MachineBasicBlock *MBB, MCRegister Reg ,
239
237
InstSet &Uses) const ;
240
238
241
- // / Collect the users of the value stored in PhysReg , which is defined
239
+ // / Collect the users of the value stored in Reg , which is defined
242
240
// / by MI.
243
- void getGlobalUses (MachineInstr *MI, MCRegister PhysReg , InstSet &Uses) const ;
241
+ void getGlobalUses (MachineInstr *MI, MCRegister Reg , InstSet &Uses) const ;
244
242
245
- // / Collect all possible definitions of the value stored in PhysReg , which is
243
+ // / Collect all possible definitions of the value stored in Reg , which is
246
244
// / used by MI.
247
- void getGlobalReachingDefs (MachineInstr *MI, MCRegister PhysReg ,
245
+ void getGlobalReachingDefs (MachineInstr *MI, MCRegister Reg ,
248
246
InstSet &Defs) const ;
249
247
250
248
// / Return whether From can be moved forwards to just before To.
@@ -269,12 +267,12 @@ class ReachingDefAnalysis : public MachineFunctionPass {
269
267
270
268
// / Return whether a MachineInstr could be inserted at MI and safely define
271
269
// / the given register without affecting the program.
272
- bool isSafeToDefRegAt (MachineInstr *MI, MCRegister PhysReg ) const ;
270
+ bool isSafeToDefRegAt (MachineInstr *MI, MCRegister Reg ) const ;
273
271
274
272
// / Return whether a MachineInstr could be inserted at MI and safely define
275
273
// / the given register without affecting the program, ignoring any effects
276
274
// / on the provided instructions.
277
- bool isSafeToDefRegAt (MachineInstr *MI, MCRegister PhysReg ,
275
+ bool isSafeToDefRegAt (MachineInstr *MI, MCRegister Reg ,
278
276
InstSet &Ignore) const ;
279
277
280
278
private:
@@ -309,9 +307,8 @@ class ReachingDefAnalysis : public MachineFunctionPass {
309
307
MachineInstr *getInstFromId (MachineBasicBlock *MBB, int InstId) const ;
310
308
311
309
// / Provides the instruction of the closest reaching def instruction of
312
- // / PhysReg that reaches MI, relative to the begining of MI's basic block.
313
- MachineInstr *getReachingLocalMIDef (MachineInstr *MI,
314
- MCRegister PhysReg) const ;
310
+ // / Reg that reaches MI, relative to the begining of MI's basic block.
311
+ MachineInstr *getReachingLocalMIDef (MachineInstr *MI, MCRegister Reg) const ;
315
312
};
316
313
317
314
} // namespace llvm
0 commit comments