[llvm-commits] [llvm] r158879 - /llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h

Jakob Stoklund Olesen stoklund at 2pi.dk
Wed Jun 20 16:54:20 PDT 2012


Author: stoklund
Date: Wed Jun 20 18:54:20 2012
New Revision: 158879

URL: http://llvm.org/viewvc/llvm-project?rev=158879&view=rev
Log:
Remove LiveIntervals::iterator.

Live intervals for regunits and virtual registers are stored separately,
and physreg live intervals are going away.

To visit the live ranges of all virtual registers, use this pattern
instead:

  for (unsigned i = 0, e = MRI->getNumVirtRegs(); i != e; ++i) {
    unsigned Reg = TargetRegisterInfo::index2VirtReg(i);
    if (MRI->reg_nodbg_empty(Reg))
      continue;

Modified:
    llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h

Modified: llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h?rev=158879&r1=158878&r2=158879&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h (original)
+++ llvm/trunk/include/llvm/CodeGen/LiveIntervalAnalysis.h Wed Jun 20 18:54:20 2012
@@ -108,12 +108,6 @@
     // Calculate the spill weight to assign to a single instruction.
     static float getSpillWeight(bool isDef, bool isUse, unsigned loopDepth);
 
-    typedef Reg2IntervalMap::iterator iterator;
-    typedef Reg2IntervalMap::const_iterator const_iterator;
-    const_iterator begin() const { return R2IMap.begin(); }
-    const_iterator end() const { return R2IMap.end(); }
-    iterator begin() { return R2IMap.begin(); }
-    iterator end() { return R2IMap.end(); }
     unsigned getNumIntervals() const { return (unsigned)R2IMap.size(); }
 
     LiveInterval &getInterval(unsigned reg) {





More information about the llvm-commits mailing list