diff options
author | Chris Lattner <sabre@nondot.org> | 2004-04-27 15:13:33 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-04-27 15:13:33 +0000 |
commit | 6ffe551f657c948d6a473a198ecbd1188bf9ce45 (patch) | |
tree | 7502db02d88eff125fc9e8c36d140faea8484787 /lib/Target/SparcV9/RegAlloc | |
parent | 21e232501a9d5ace29187b20a211ca73b09a1c75 (diff) | |
download | external_llvm-6ffe551f657c948d6a473a198ecbd1188bf9ce45.zip external_llvm-6ffe551f657c948d6a473a198ecbd1188bf9ce45.tar.gz external_llvm-6ffe551f657c948d6a473a198ecbd1188bf9ce45.tar.bz2 |
Changes to fix up the inst_iterator to pass to boost iterator checks. This
patch was graciously contributed by Vladimir Prus.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@13185 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SparcV9/RegAlloc')
-rw-r--r-- | lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp index 28fc75a..0f4c4bd 100644 --- a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp +++ b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp @@ -1167,9 +1167,9 @@ void PhyRegAlloc::saveState () { unsigned Insn = 0; // Instructions themselves encoded as operand # -1 for (const_inst_iterator II=inst_begin (Fn), IE=inst_end (Fn); II!=IE; ++II){ - saveStateForValue (state, (*II), Insn, -1); - for (unsigned i = 0; i < (*II)->getNumOperands (); ++i) { - const Value *V = (*II)->getOperand (i); + saveStateForValue (state, (&*II), Insn, -1); + for (unsigned i = 0; i < (*II).getNumOperands (); ++i) { + const Value *V = (*II).getOperand (i); // Don't worry about it unless it's something whose reg. we'll need. if (!isa<Argument> (V) && !isa<Instruction> (V)) continue; @@ -1201,7 +1201,7 @@ void PhyRegAlloc::verifySavedState () { } int Insn = 0; for (const_inst_iterator II=inst_begin (Fn), IE=inst_end (Fn); II!=IE; ++II) { - const Instruction *I = *II; + const Instruction *I = &*II; MachineCodeForInstruction &Instrs = MachineCodeForInstruction::get (I); std::cerr << "Instruction: " << *I << "MachineCodeForInstruction:\n"; |