blob: bb1b0bb089c9f14f924059ada63b1dfd38b0f829 [file] [log] [blame]
Vikram S. Adve39c94e12002-09-14 23:05:33 +00001//===-- LiveRangeInfo.cpp -------------------------------------------------===//
2//
3// Live range construction for coloring-based register allocation for LLVM.
4//
5//===----------------------------------------------------------------------===//
6
Ruchira Sasanka8e604792001-09-14 21:18:34 +00007#include "llvm/CodeGen/LiveRangeInfo.h"
Vikram S. Adve39c94e12002-09-14 23:05:33 +00008#include "llvm/CodeGen/RegAllocCommon.h"
Chris Lattner0a8ed942002-02-04 05:56:09 +00009#include "llvm/CodeGen/RegClass.h"
Chris Lattnercb6b4bd2002-10-29 16:51:05 +000010#include "llvm/CodeGen/IGNode.h"
Chris Lattner0a8ed942002-02-04 05:56:09 +000011#include "llvm/CodeGen/MachineInstr.h"
Chris Lattnerf726e772002-10-28 19:22:04 +000012#include "llvm/CodeGen/MachineFunction.h"
Chris Lattner0a8ed942002-02-04 05:56:09 +000013#include "llvm/Target/TargetMachine.h"
Chris Lattner0be79c62002-10-28 02:28:39 +000014#include "llvm/Target/MachineInstrInfo.h"
Chris Lattner2fbfdcf2002-04-07 20:49:59 +000015#include "llvm/Function.h"
Chris Lattner7471a7b2002-02-05 03:35:53 +000016#include "Support/SetOperations.h"
Chris Lattner697954c2002-01-20 22:54:45 +000017using std::cerr;
Ruchira Sasanka8e604792001-09-14 21:18:34 +000018
Chris Lattner2fbfdcf2002-04-07 20:49:59 +000019LiveRangeInfo::LiveRangeInfo(const Function *F, const TargetMachine &tm,
Chris Lattner697954c2002-01-20 22:54:45 +000020 std::vector<RegClass *> &RCL)
Chris Lattner2fbfdcf2002-04-07 20:49:59 +000021 : Meth(F), TM(tm), RegClassList(RCL), MRI(tm.getRegInfo()) { }
Ruchira Sasanka8e604792001-09-14 21:18:34 +000022
23
Ruchira Sasanka4f3eb222002-01-07 19:19:18 +000024LiveRangeInfo::~LiveRangeInfo() {
Chris Lattner2f898d22002-02-05 06:02:59 +000025 for (LiveRangeMapType::iterator MI = LiveRangeMap.begin();
26 MI != LiveRangeMap.end(); ++MI) {
Ruchira Sasanka4f3eb222002-01-07 19:19:18 +000027
Chris Lattner697954c2002-01-20 22:54:45 +000028 if (MI->first && MI->second) {
29 LiveRange *LR = MI->second;
30
31 // we need to be careful in deleting LiveRanges in LiveRangeMap
32 // since two/more Values in the live range map can point to the same
33 // live range. We have to make the other entries NULL when we delete
34 // a live range.
35
Chris Lattnercb6b4bd2002-10-29 16:51:05 +000036 for (LiveRange::iterator LI = LR->begin(); LI != LR->end(); ++LI)
Chris Lattner697954c2002-01-20 22:54:45 +000037 LiveRangeMap[*LI] = 0;
38
39 delete LR;
Ruchira Sasanka4f3eb222002-01-07 19:19:18 +000040 }
41 }
Ruchira Sasanka4f3eb222002-01-07 19:19:18 +000042}
43
44
45//---------------------------------------------------------------------------
Ruchira Sasanka8e604792001-09-14 21:18:34 +000046// union two live ranges into one. The 2nd LR is deleted. Used for coalescing.
Ruchira Sasankaa5ab9642001-09-30 23:11:59 +000047// Note: the caller must make sure that L1 and L2 are distinct and both
48// LRs don't have suggested colors
Ruchira Sasanka4f3eb222002-01-07 19:19:18 +000049//---------------------------------------------------------------------------
Ruchira Sasanka8e604792001-09-14 21:18:34 +000050
Chris Lattner296b7732002-02-05 02:52:05 +000051void LiveRangeInfo::unionAndUpdateLRs(LiveRange *L1, LiveRange *L2) {
52 assert(L1 != L2 && (!L1->hasSuggestedColor() || !L2->hasSuggestedColor()));
53 set_union(*L1, *L2); // add elements of L2 to L1
Ruchira Sasanka8e604792001-09-14 21:18:34 +000054
Chris Lattner296b7732002-02-05 02:52:05 +000055 for(ValueSet::iterator L2It = L2->begin(); L2It != L2->end(); ++L2It) {
Ruchira Sasanka8e604792001-09-14 21:18:34 +000056 //assert(( L1->getTypeID() == L2->getTypeID()) && "Merge:Different types");
57
Chris Lattner30adeb62002-02-04 16:36:59 +000058 L1->insert(*L2It); // add the var in L2 to L1
Chris Lattner2fbfdcf2002-04-07 20:49:59 +000059 LiveRangeMap[*L2It] = L1; // now the elements in L2 should map
Ruchira Sasanka4f3eb222002-01-07 19:19:18 +000060 //to L1
Ruchira Sasanka8e604792001-09-14 21:18:34 +000061 }
Ruchira Sasankaa5ab9642001-09-30 23:11:59 +000062
63
64 // Now if LROfDef(L1) has a suggested color, it will remain.
65 // But, if LROfUse(L2) has a suggested color, the new range
66 // must have the same color.
67
68 if(L2->hasSuggestedColor())
Chris Lattner296b7732002-02-05 02:52:05 +000069 L1->setSuggestedColor(L2->getSuggestedColor());
Ruchira Sasankaa5ab9642001-09-30 23:11:59 +000070
Ruchira Sasanka958faf32001-10-19 17:21:03 +000071
Chris Lattner296b7732002-02-05 02:52:05 +000072 if (L2->isCallInterference())
Ruchira Sasanka958faf32001-10-19 17:21:03 +000073 L1->setCallInterference();
74
Chris Lattner296b7732002-02-05 02:52:05 +000075 // add the spill costs
76 L1->addSpillCost(L2->getSpillCost());
77
Chris Lattner697954c2002-01-20 22:54:45 +000078 delete L2; // delete L2 as it is no longer needed
Ruchira Sasanka8e604792001-09-14 21:18:34 +000079}
80
81
Vikram S. Adve9d67cd12002-09-28 17:05:22 +000082//---------------------------------------------------------------------------
83// Method for creating a single live range for a definition.
84// The definition must be represented by a virtual register (a Value).
85// Note: this function does *not* check that no live range exists for def.
86//---------------------------------------------------------------------------
87
88LiveRange*
89LiveRangeInfo::createNewLiveRange(const Value* Def, bool isCC /* = false*/)
90{
91 LiveRange* DefRange = new LiveRange(); // Create a new live range,
92 DefRange->insert(Def); // add Def to it,
93 LiveRangeMap[Def] = DefRange; // and update the map.
94
95 // set the register class of the new live range
96 DefRange->setRegClass(RegClassList[MRI.getRegClassIDOfValue(Def, isCC)]);
97
98 if (DEBUG_RA >= RA_DEBUG_LiveRanges) {
99 cerr << " Creating a LR for def ";
100 if (isCC) cerr << " (CC Register!)";
101 cerr << " : " << RAV(Def) << "\n";
102 }
103 return DefRange;
104}
105
106
107LiveRange*
108LiveRangeInfo::createOrAddToLiveRange(const Value* Def, bool isCC /* = false*/)
109{
110 LiveRange *DefRange = LiveRangeMap[Def];
111
112 // check if the LR is already there (because of multiple defs)
113 if (!DefRange) {
Chris Lattner133f0792002-10-28 04:45:29 +0000114 DefRange = createNewLiveRange(Def, isCC);
Vikram S. Adve9d67cd12002-09-28 17:05:22 +0000115 } else { // live range already exists
116 DefRange->insert(Def); // add the operand to the range
117 LiveRangeMap[Def] = DefRange; // make operand point to merged set
118 if (DEBUG_RA >= RA_DEBUG_LiveRanges)
119 cerr << " Added to existing LR for def: " << RAV(Def) << "\n";
120 }
121 return DefRange;
122}
123
Ruchira Sasanka8e604792001-09-14 21:18:34 +0000124
Ruchira Sasanka4f3eb222002-01-07 19:19:18 +0000125//---------------------------------------------------------------------------
Chris Lattner2fbfdcf2002-04-07 20:49:59 +0000126// Method for constructing all live ranges in a function. It creates live
Ruchira Sasanka4f3eb222002-01-07 19:19:18 +0000127// ranges for all values defined in the instruction stream. Also, it
Chris Lattner2fbfdcf2002-04-07 20:49:59 +0000128// creates live ranges for all incoming arguments of the function.
Ruchira Sasanka4f3eb222002-01-07 19:19:18 +0000129//---------------------------------------------------------------------------
Chris Lattner2f898d22002-02-05 06:02:59 +0000130void LiveRangeInfo::constructLiveRanges() {
Ruchira Sasanka8e604792001-09-14 21:18:34 +0000131
Vikram S. Adve39c94e12002-09-14 23:05:33 +0000132 if (DEBUG_RA >= RA_DEBUG_LiveRanges)
133 cerr << "Constructing Live Ranges ...\n";
Ruchira Sasanka8e604792001-09-14 21:18:34 +0000134
Chris Lattner2fbfdcf2002-04-07 20:49:59 +0000135 // first find the live ranges for all incoming args of the function since
136 // those LRs start from the start of the function
Vikram S. Adve9d67cd12002-09-28 17:05:22 +0000137 for (Function::const_aiterator AI = Meth->abegin(); AI != Meth->aend(); ++AI)
Chris Lattner133f0792002-10-28 04:45:29 +0000138 createNewLiveRange(AI, /*isCC*/ false);
Ruchira Sasanka8e604792001-09-14 21:18:34 +0000139
Chris Lattner2fbfdcf2002-04-07 20:49:59 +0000140 // Now suggest hardware registers for these function args
Ruchira Sasankaa5ab9642001-09-30 23:11:59 +0000141 MRI.suggestRegs4MethodArgs(Meth, *this);
Ruchira Sasanka8e604792001-09-14 21:18:34 +0000142
Vikram S. Adve9d67cd12002-09-28 17:05:22 +0000143 // Now create LRs for machine instructions. A new LR will be created
144 // only for defs in the machine instr since, we assume that all Values are
145 // defined before they are used. However, there can be multiple defs for
146 // the same Value in machine instructions.
147 //
148 // Also, find CALL and RETURN instructions, which need extra work.
Chris Lattner2f898d22002-02-05 06:02:59 +0000149 //
Chris Lattnerf726e772002-10-28 19:22:04 +0000150 MachineFunction &MF = MachineFunction::get(Meth);
151 for (MachineFunction::iterator BBI = MF.begin(); BBI != MF.end(); ++BBI) {
152 MachineBasicBlock &MBB = *BBI;
Vikram S. Adve9d67cd12002-09-28 17:05:22 +0000153
Ruchira Sasanka8e604792001-09-14 21:18:34 +0000154 // iterate over all the machine instructions in BB
Chris Lattnerf726e772002-10-28 19:22:04 +0000155 for(MachineBasicBlock::iterator MInstIterator = MBB.begin();
156 MInstIterator != MBB.end(); ++MInstIterator) {
Vikram S. Advec9a0ca52002-07-08 23:07:26 +0000157 MachineInstr *MInst = *MInstIterator;
Ruchira Sasankaa5ab9642001-09-30 23:11:59 +0000158
Vikram S. Adve9d67cd12002-09-28 17:05:22 +0000159 // If the machine instruction is a call/return instruction, add it to
160 // CallRetInstrList for processing its args, ret value, and ret addr.
161 //
Chris Lattner697954c2002-01-20 22:54:45 +0000162 if(TM.getInstrInfo().isReturn(MInst->getOpCode()) ||
163 TM.getInstrInfo().isCall(MInst->getOpCode()))
Chris Lattner133f0792002-10-28 04:45:29 +0000164 CallRetInstrList.push_back(MInst);
Ruchira Sasankaa90e7702001-10-15 16:26:38 +0000165
Vikram S. Adve9d67cd12002-09-28 17:05:22 +0000166 // iterate over explicit MI operands and create a new LR
167 // for each operand that is defined by the instruction
Vikram S. Advec9a0ca52002-07-08 23:07:26 +0000168 for (MachineInstr::val_op_iterator OpI = MInst->begin(),
Vikram S. Adve9d67cd12002-09-28 17:05:22 +0000169 OpE = MInst->end(); OpI != OpE; ++OpI)
Chris Lattner30adeb62002-02-04 16:36:59 +0000170 if (OpI.isDef()) {
171 const Value *Def = *OpI;
Chris Lattner133f0792002-10-28 04:45:29 +0000172 bool isCC = (OpI.getMachineOperand().getType()
Vikram S. Adve9d67cd12002-09-28 17:05:22 +0000173 == MachineOperand::MO_CCRegister);
Chris Lattner133f0792002-10-28 04:45:29 +0000174 createOrAddToLiveRange(Def, isCC);
Vikram S. Adve9d67cd12002-09-28 17:05:22 +0000175 }
Ruchira Sasankaa5ab9642001-09-30 23:11:59 +0000176
Vikram S. Adve9d67cd12002-09-28 17:05:22 +0000177 // iterate over implicit MI operands and create a new LR
178 // for each operand that is defined by the instruction
179 for (unsigned i = 0; i < MInst->getNumImplicitRefs(); ++i)
180 if (MInst->implicitRefIsDefined(i)) {
181 const Value *Def = MInst->getImplicitRef(i);
Chris Lattner133f0792002-10-28 04:45:29 +0000182 createOrAddToLiveRange(Def, /*isCC*/ false);
Vikram S. Adve9d67cd12002-09-28 17:05:22 +0000183 }
Ruchira Sasanka8e604792001-09-14 21:18:34 +0000184
185 } // for all machine instructions in the BB
186
Chris Lattner2fbfdcf2002-04-07 20:49:59 +0000187 } // for all BBs in function
Ruchira Sasankaa5ab9642001-09-30 23:11:59 +0000188
Ruchira Sasankaa90e7702001-10-15 16:26:38 +0000189 // Now we have to suggest clors for call and return arg live ranges.
190 // Also, if there are implicit defs (e.g., retun value of a call inst)
191 // they must be added to the live range list
Vikram S. Adve9d67cd12002-09-28 17:05:22 +0000192 //
Ruchira Sasankaa90e7702001-10-15 16:26:38 +0000193 suggestRegs4CallRets();
Ruchira Sasanka8e604792001-09-14 21:18:34 +0000194
Vikram S. Adve39c94e12002-09-14 23:05:33 +0000195 if( DEBUG_RA >= RA_DEBUG_LiveRanges)
Chris Lattner697954c2002-01-20 22:54:45 +0000196 cerr << "Initial Live Ranges constructed!\n";
Ruchira Sasanka8e604792001-09-14 21:18:34 +0000197}
198
199
Ruchira Sasanka4f3eb222002-01-07 19:19:18 +0000200//---------------------------------------------------------------------------
201// If some live ranges must be colored with specific hardware registers
202// (e.g., for outgoing call args), suggesting of colors for such live
Chris Lattner2fbfdcf2002-04-07 20:49:59 +0000203// ranges is done using target specific function. Those functions are called
Ruchira Sasanka4f3eb222002-01-07 19:19:18 +0000204// from this function. The target specific methods must:
205// 1) suggest colors for call and return args.
206// 2) create new LRs for implicit defs in machine instructions
207//---------------------------------------------------------------------------
Ruchira Sasankaa90e7702001-10-15 16:26:38 +0000208void LiveRangeInfo::suggestRegs4CallRets()
209{
Vikram S. Advec9a0ca52002-07-08 23:07:26 +0000210 CallRetInstrListType::iterator It = CallRetInstrList.begin();
Ruchira Sasankaa90e7702001-10-15 16:26:38 +0000211 for( ; It != CallRetInstrList.end(); ++It ) {
212
Vikram S. Advec9a0ca52002-07-08 23:07:26 +0000213 MachineInstr *MInst = *It;
Ruchira Sasankaa90e7702001-10-15 16:26:38 +0000214 MachineOpCode OpCode = MInst->getOpCode();
215
216 if( (TM.getInstrInfo()).isReturn(OpCode) )
217 MRI.suggestReg4RetValue( MInst, *this);
218
219 else if( (TM.getInstrInfo()).isCall( OpCode ) )
Vikram S. Adve9d67cd12002-09-28 17:05:22 +0000220 MRI.suggestRegs4CallArgs( MInst, *this);
Ruchira Sasankaa90e7702001-10-15 16:26:38 +0000221
222 else
223 assert( 0 && "Non call/ret instr in CallRetInstrList" );
224 }
225
226}
227
228
Ruchira Sasanka4f3eb222002-01-07 19:19:18 +0000229//--------------------------------------------------------------------------
230// The following method coalesces live ranges when possible. This method
231// must be called after the interference graph has been constructed.
Ruchira Sasankaa90e7702001-10-15 16:26:38 +0000232
233
Ruchira Sasanka8e604792001-09-14 21:18:34 +0000234/* Algorithm:
Chris Lattner2fbfdcf2002-04-07 20:49:59 +0000235 for each BB in function
Ruchira Sasanka8e604792001-09-14 21:18:34 +0000236 for each machine instruction (inst)
237 for each definition (def) in inst
238 for each operand (op) of inst that is a use
Ruchira Sasankaefaf9be2001-11-10 00:20:24 +0000239 if the def and op are of the same register type
Ruchira Sasanka8e604792001-09-14 21:18:34 +0000240 if the def and op do not interfere //i.e., not simultaneously live
241 if (degree(LR of def) + degree(LR of op)) <= # avail regs
Ruchira Sasankaa5ab9642001-09-30 23:11:59 +0000242 if both LRs do not have suggested colors
243 merge2IGNodes(def, op) // i.e., merge 2 LRs
Ruchira Sasanka8e604792001-09-14 21:18:34 +0000244
245*/
Ruchira Sasanka4f3eb222002-01-07 19:19:18 +0000246//---------------------------------------------------------------------------
247void LiveRangeInfo::coalesceLRs()
248{
Vikram S. Adve39c94e12002-09-14 23:05:33 +0000249 if(DEBUG_RA >= RA_DEBUG_LiveRanges)
250 cerr << "\nCoalescing LRs ...\n";
Ruchira Sasanka8e604792001-09-14 21:18:34 +0000251
Chris Lattnerf726e772002-10-28 19:22:04 +0000252 MachineFunction &MF = MachineFunction::get(Meth);
253 for (MachineFunction::iterator BBI = MF.begin(); BBI != MF.end(); ++BBI) {
254 MachineBasicBlock &MBB = *BBI;
Ruchira Sasanka8e604792001-09-14 21:18:34 +0000255
256 // iterate over all the machine instructions in BB
Chris Lattnerf726e772002-10-28 19:22:04 +0000257 for(MachineBasicBlock::iterator MII = MBB.begin(); MII != MBB.end(); ++MII){
258 const MachineInstr *MI = *MII;
Ruchira Sasanka8e604792001-09-14 21:18:34 +0000259
Vikram S. Adve39c94e12002-09-14 23:05:33 +0000260 if( DEBUG_RA >= RA_DEBUG_LiveRanges) {
Chris Lattner697954c2002-01-20 22:54:45 +0000261 cerr << " *Iterating over machine instr ";
Chris Lattnerf726e772002-10-28 19:22:04 +0000262 MI->dump();
Chris Lattner697954c2002-01-20 22:54:45 +0000263 cerr << "\n";
Ruchira Sasanka8e604792001-09-14 21:18:34 +0000264 }
265
Ruchira Sasanka8e604792001-09-14 21:18:34 +0000266 // iterate over MI operands to find defs
Chris Lattnerf726e772002-10-28 19:22:04 +0000267 for(MachineInstr::const_val_op_iterator DefI = MI->begin(),
268 DefE = MI->end(); DefI != DefE; ++DefI) {
Chris Lattner2f898d22002-02-05 06:02:59 +0000269 if (DefI.isDef()) { // iff this operand is a def
270 LiveRange *LROfDef = getLiveRangeForValue( *DefI );
271 RegClass *RCOfDef = LROfDef->getRegClass();
Ruchira Sasanka8e604792001-09-14 21:18:34 +0000272
Chris Lattnerf726e772002-10-28 19:22:04 +0000273 MachineInstr::const_val_op_iterator UseI = MI->begin(),
274 UseE = MI->end();
275 for( ; UseI != UseE; ++UseI) { // for all uses
Chris Lattner2f898d22002-02-05 06:02:59 +0000276 LiveRange *LROfUse = getLiveRangeForValue( *UseI );
277 if (!LROfUse) { // if LR of use is not found
Ruchira Sasanka8e604792001-09-14 21:18:34 +0000278 //don't warn about labels
Vikram S. Adve39c94e12002-09-14 23:05:33 +0000279 if (!isa<BasicBlock>(*UseI) && DEBUG_RA >= RA_DEBUG_LiveRanges)
Chris Lattner0665a5f2002-02-05 01:43:49 +0000280 cerr << " !! Warning: No LR for use " << RAV(*UseI) << "\n";
Ruchira Sasanka8e604792001-09-14 21:18:34 +0000281 continue; // ignore and continue
282 }
283
Chris Lattner2f898d22002-02-05 06:02:59 +0000284 if (LROfUse == LROfDef) // nothing to merge if they are same
Ruchira Sasanka8e604792001-09-14 21:18:34 +0000285 continue;
286
Chris Lattner37730942002-02-05 03:52:29 +0000287 if (MRI.getRegType(LROfDef) == MRI.getRegType(LROfUse)) {
Ruchira Sasankaefaf9be2001-11-10 00:20:24 +0000288
289 // If the two RegTypes are the same
Chris Lattner37730942002-02-05 03:52:29 +0000290 if (!RCOfDef->getInterference(LROfDef, LROfUse) ) {
Ruchira Sasanka8e604792001-09-14 21:18:34 +0000291
292 unsigned CombinedDegree =
293 LROfDef->getUserIGNode()->getNumOfNeighbors() +
294 LROfUse->getUserIGNode()->getNumOfNeighbors();
295
Vikram S. Adve32f81a32002-09-20 00:45:47 +0000296 if (CombinedDegree > RCOfDef->getNumOfAvailRegs()) {
297 // get more precise estimate of combined degree
298 CombinedDegree = LROfDef->getUserIGNode()->
299 getCombinedDegree(LROfUse->getUserIGNode());
300 }
301
Chris Lattner37730942002-02-05 03:52:29 +0000302 if (CombinedDegree <= RCOfDef->getNumOfAvailRegs()) {
Ruchira Sasankaa5ab9642001-09-30 23:11:59 +0000303 // if both LRs do not have suggested colors
Chris Lattner37730942002-02-05 03:52:29 +0000304 if (!(LROfDef->hasSuggestedColor() &&
305 LROfUse->hasSuggestedColor())) {
Ruchira Sasankaa5ab9642001-09-30 23:11:59 +0000306
307 RCOfDef->mergeIGNodesOfLRs(LROfDef, LROfUse);
308 unionAndUpdateLRs(LROfDef, LROfUse);
309 }
310
Ruchira Sasanka8e604792001-09-14 21:18:34 +0000311 } // if combined degree is less than # of regs
Ruchira Sasanka8e604792001-09-14 21:18:34 +0000312 } // if def and use do not interfere
Ruchira Sasankad33238b2001-10-12 17:48:18 +0000313 }// if reg classes are the same
Ruchira Sasanka8e604792001-09-14 21:18:34 +0000314 } // for all uses
Ruchira Sasanka8e604792001-09-14 21:18:34 +0000315 } // if def
Ruchira Sasanka8e604792001-09-14 21:18:34 +0000316 } // for all defs
Ruchira Sasanka8e604792001-09-14 21:18:34 +0000317 } // for all machine instructions
Ruchira Sasanka8e604792001-09-14 21:18:34 +0000318 } // for all BBs
319
Vikram S. Adve39c94e12002-09-14 23:05:33 +0000320 if (DEBUG_RA >= RA_DEBUG_LiveRanges)
321 cerr << "\nCoalescing Done!\n";
Ruchira Sasanka8e604792001-09-14 21:18:34 +0000322}
323
324
325
326
327
328/*--------------------------- Debug code for printing ---------------*/
329
330
Chris Lattner0665a5f2002-02-05 01:43:49 +0000331void LiveRangeInfo::printLiveRanges() {
Ruchira Sasanka8e604792001-09-14 21:18:34 +0000332 LiveRangeMapType::iterator HMI = LiveRangeMap.begin(); // hash map iterator
Chris Lattner697954c2002-01-20 22:54:45 +0000333 cerr << "\nPrinting Live Ranges from Hash Map:\n";
Chris Lattner0665a5f2002-02-05 01:43:49 +0000334 for( ; HMI != LiveRangeMap.end(); ++HMI) {
335 if (HMI->first && HMI->second) {
Vikram S. Adve39c94e12002-09-14 23:05:33 +0000336 cerr << " Value* " << RAV(HMI->first) << "\t: ";
Vikram S. Adve32f81a32002-09-20 00:45:47 +0000337 if (IGNode* igNode = HMI->second->getUserIGNode())
338 cerr << "LR# " << igNode->getIndex();
339 else
340 cerr << "LR# " << "<no-IGNode>";
Vikram S. Adve39c94e12002-09-14 23:05:33 +0000341 cerr << "\t:Values = "; printSet(*HMI->second); cerr << "\n";
Ruchira Sasanka8e604792001-09-14 21:18:34 +0000342 }
343 }
344}