mirror of
https://github.com/RPCS3/llvm.git
synced 2025-02-06 10:38:54 +00:00
Rename variables for consistency.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103013 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
c918d6043b
commit
28428cd6f3
@ -52,22 +52,22 @@ void llvm::PHIElimination::getAnalysisUsage(AnalysisUsage &AU) const {
|
|||||||
MachineFunctionPass::getAnalysisUsage(AU);
|
MachineFunctionPass::getAnalysisUsage(AU);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool llvm::PHIElimination::runOnMachineFunction(MachineFunction &Fn) {
|
bool llvm::PHIElimination::runOnMachineFunction(MachineFunction &MF) {
|
||||||
MRI = &Fn.getRegInfo();
|
MRI = &MF.getRegInfo();
|
||||||
|
|
||||||
bool Changed = false;
|
bool Changed = false;
|
||||||
|
|
||||||
// Split critical edges to help the coalescer
|
// Split critical edges to help the coalescer
|
||||||
if (LiveVariables *LV = getAnalysisIfAvailable<LiveVariables>())
|
if (LiveVariables *LV = getAnalysisIfAvailable<LiveVariables>())
|
||||||
for (MachineFunction::iterator I = Fn.begin(), E = Fn.end(); I != E; ++I)
|
for (MachineFunction::iterator I = MF.begin(), E = MF.end(); I != E; ++I)
|
||||||
Changed |= SplitPHIEdges(Fn, *I, *LV);
|
Changed |= SplitPHIEdges(MF, *I, *LV);
|
||||||
|
|
||||||
// Populate VRegPHIUseCount
|
// Populate VRegPHIUseCount
|
||||||
analyzePHINodes(Fn);
|
analyzePHINodes(MF);
|
||||||
|
|
||||||
// Eliminate PHI instructions by inserting copies into predecessor blocks.
|
// Eliminate PHI instructions by inserting copies into predecessor blocks.
|
||||||
for (MachineFunction::iterator I = Fn.begin(), E = Fn.end(); I != E; ++I)
|
for (MachineFunction::iterator I = MF.begin(), E = MF.end(); I != E; ++I)
|
||||||
Changed |= EliminatePHINodes(Fn, *I);
|
Changed |= EliminatePHINodes(MF, *I);
|
||||||
|
|
||||||
// Remove dead IMPLICIT_DEF instructions.
|
// Remove dead IMPLICIT_DEF instructions.
|
||||||
for (SmallPtrSet<MachineInstr*, 4>::iterator I = ImpDefs.begin(),
|
for (SmallPtrSet<MachineInstr*, 4>::iterator I = ImpDefs.begin(),
|
||||||
@ -81,11 +81,12 @@ bool llvm::PHIElimination::runOnMachineFunction(MachineFunction &Fn) {
|
|||||||
// Clean up the lowered PHI instructions.
|
// Clean up the lowered PHI instructions.
|
||||||
for (LoweredPHIMap::iterator I = LoweredPHIs.begin(), E = LoweredPHIs.end();
|
for (LoweredPHIMap::iterator I = LoweredPHIs.begin(), E = LoweredPHIs.end();
|
||||||
I != E; ++I)
|
I != E; ++I)
|
||||||
Fn.DeleteMachineInstr(I->first);
|
MF.DeleteMachineInstr(I->first);
|
||||||
|
|
||||||
LoweredPHIs.clear();
|
LoweredPHIs.clear();
|
||||||
ImpDefs.clear();
|
ImpDefs.clear();
|
||||||
VRegPHIUseCount.clear();
|
VRegPHIUseCount.clear();
|
||||||
|
|
||||||
return Changed;
|
return Changed;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -364,8 +365,8 @@ void llvm::PHIElimination::LowerAtomicPHINode(
|
|||||||
/// used in a PHI node. We map that to the BB the vreg is coming from. This is
|
/// used in a PHI node. We map that to the BB the vreg is coming from. This is
|
||||||
/// used later to determine when the vreg is killed in the BB.
|
/// used later to determine when the vreg is killed in the BB.
|
||||||
///
|
///
|
||||||
void llvm::PHIElimination::analyzePHINodes(const MachineFunction& Fn) {
|
void llvm::PHIElimination::analyzePHINodes(const MachineFunction& MF) {
|
||||||
for (MachineFunction::const_iterator I = Fn.begin(), E = Fn.end();
|
for (MachineFunction::const_iterator I = MF.begin(), E = MF.end();
|
||||||
I != E; ++I)
|
I != E; ++I)
|
||||||
for (MachineBasicBlock::const_iterator BBI = I->begin(), BBE = I->end();
|
for (MachineBasicBlock::const_iterator BBI = I->begin(), BBE = I->end();
|
||||||
BBI != BBE && BBI->isPHI(); ++BBI)
|
BBI != BBE && BBI->isPHI(); ++BBI)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user