summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2003-05-01 21:18:47 +0000
committerChris Lattner <sabre@nondot.org>2003-05-01 21:18:47 +0000
commitf641fd08bcba1acec89dfdeb8f5f4b43d678db25 (patch)
tree4b44c5622c44da8853f5a5f6da4c4a1027bb2a59 /llvm/lib/CodeGen
parent802c63d964b1e962d96792fe5bfa3b4120d19cda (diff)
downloadbcm5719-llvm-f641fd08bcba1acec89dfdeb8f5f4b43d678db25.tar.gz
bcm5719-llvm-f641fd08bcba1acec89dfdeb8f5f4b43d678db25.zip
Minor cleanup
llvm-svn: 5976
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/LiveVariables.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/llvm/lib/CodeGen/LiveVariables.cpp b/llvm/lib/CodeGen/LiveVariables.cpp
index 47bc8bdea16..ccaee19529f 100644
--- a/llvm/lib/CodeGen/LiveVariables.cpp
+++ b/llvm/lib/CodeGen/LiveVariables.cpp
@@ -209,15 +209,17 @@ bool LiveVariables::runOnMachineFunction(MachineFunction &MF) {
// bottom of this basic block. We check all of our successor blocks to see
// if they have PHI nodes, and if so, we simulate an assignment at the end
// of the current block.
- for (succ_const_iterator I = succ_begin(BB), E = succ_end(BB); I != E; ++I){
- MachineBasicBlock *Succ = BBMap.find(*I)->second.first;
+ for (succ_const_iterator SI = succ_begin(BB), E = succ_end(BB);
+ SI != E; ++SI) {
+ MachineBasicBlock *Succ = BBMap.find(*SI)->second.first;
// PHI nodes are guaranteed to be at the top of the block...
for (MachineBasicBlock::iterator I = Succ->begin(), E = Succ->end();
I != E && (*I)->getOpcode() == TargetInstrInfo::PHI; ++I) {
+ MachineInstr *MI = *I;
for (unsigned i = 1; ; i += 2)
- if ((*I)->getOperand(i+1).getMachineBasicBlock() == MBB) {
- MachineOperand &MO = (*I)->getOperand(i);
+ if (MI->getOperand(i+1).getMachineBasicBlock() == MBB) {
+ MachineOperand &MO = MI->getOperand(i);
if (!MO.getVRegValueOrNull()) {
unsigned RegIdx = MO.getReg()-MRegisterInfo::FirstVirtualRegister;
VarInfo &VRInfo = getVarInfo(RegIdx);
OpenPOWER on IntegriCloud