On Feb 12, 2008, at 6:45 PM, Evan Cheng wrote: > URL: http://llvm.org/viewvc/llvm-project?rev=47042&view=rev > Log: > Added debugging routine dumpUses.
Nice. > +++ llvm/trunk/include/llvm/CodeGen/MachineRegisterInfo.h Tue Feb 12 > 20:45:38 2008 > +#ifndef NDEBUG > + void dumpUses(unsigned RegNo) const; > +#endif I wouldn't bother ifdefing this. This is a recipe for getting compile errors later if someone forgets to #ifdef all uses. > +#ifndef NDEBUG > +void MachineRegisterInfo::dumpUses(unsigned Reg) const { > + for (use_iterator I = use_begin(Reg), E = use_end(); I != E; ++I) > + I.getOperand().getParent()->dump(); > +} > +#endif This can be simplified to: I->dump(); -Chris _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits