LLVM API Documentation

LiveIntervalAnalysis.h

Go to the documentation of this file.
00001 //===-- LiveIntervalAnalysis.h - Live Interval Analysis ---------*- C++ -*-===//
00002 //
00003 //                     The LLVM Compiler Infrastructure
00004 //
00005 // This file is distributed under the University of Illinois Open Source
00006 // License. See LICENSE.TXT for details.
00007 //
00008 //===----------------------------------------------------------------------===//
00009 //
00010 // This file implements the LiveInterval analysis pass.  Given some numbering of
00011 // each the machine instructions (in this implemention depth-first order) an
00012 // interval [i, j) is said to be a live interval for register v if there is no
00013 // instruction with number j' > j such that v is live at j' and there is no
00014 // instruction with number i' < i such that v is live at i'. In this
00015 // implementation intervals can have holes, i.e. an interval might look like
00016 // [1,20), [50,65), [1000,1001).
00017 //
00018 //===----------------------------------------------------------------------===//
00019 
00020 #ifndef LLVM_CODEGEN_LIVEINTERVAL_ANALYSIS_H
00021 #define LLVM_CODEGEN_LIVEINTERVAL_ANALYSIS_H
00022 
00023 #include "llvm/CodeGen/MachineFunctionPass.h"
00024 #include "llvm/CodeGen/LiveInterval.h"
00025 #include "llvm/ADT/BitVector.h"
00026 #include "llvm/ADT/DenseMap.h"
00027 #include "llvm/ADT/SmallPtrSet.h"
00028 #include "llvm/ADT/SmallVector.h"
00029 #include "llvm/Support/Allocator.h"
00030 #include <cmath>
00031 
00032 namespace llvm {
00033 
00034   class AliasAnalysis;
00035   class LiveVariables;
00036   class MachineLoopInfo;
00037   class TargetRegisterInfo;
00038   class MachineRegisterInfo;
00039   class TargetInstrInfo;
00040   class TargetRegisterClass;
00041   class VirtRegMap;
00042   typedef std::pair<unsigned, MachineBasicBlock*> IdxMBBPair;
00043 
00044   inline bool operator<(unsigned V, const IdxMBBPair &IM) {
00045     return V < IM.first;
00046   }
00047 
00048   inline bool operator<(const IdxMBBPair &IM, unsigned V) {
00049     return IM.first < V;
00050   }
00051 
00052   struct Idx2MBBCompare {
00053     bool operator()(const IdxMBBPair &LHS, const IdxMBBPair &RHS) const {
00054       return LHS.first < RHS.first;
00055     }
00056   };
00057   
00058   class LiveIntervals : public MachineFunctionPass {
00059     MachineFunction* mf_;
00060     MachineRegisterInfo* mri_;
00061     const TargetMachine* tm_;
00062     const TargetRegisterInfo* tri_;
00063     const TargetInstrInfo* tii_;
00064     AliasAnalysis *aa_;
00065     LiveVariables* lv_;
00066 
00067     /// Special pool allocator for VNInfo's (LiveInterval val#).
00068     ///
00069     BumpPtrAllocator VNInfoAllocator;
00070 
00071     /// MBB2IdxMap - The indexes of the first and last instructions in the
00072     /// specified basic block.
00073     std::vector<std::pair<unsigned, unsigned> > MBB2IdxMap;
00074 
00075     /// Idx2MBBMap - Sorted list of pairs of index of first instruction
00076     /// and MBB id.
00077     std::vector<IdxMBBPair> Idx2MBBMap;
00078 
00079     /// FunctionSize - The number of instructions present in the function
00080     uint64_t FunctionSize;
00081 
00082     typedef DenseMap<MachineInstr*, unsigned> Mi2IndexMap;
00083     Mi2IndexMap mi2iMap_;
00084 
00085     typedef std::vector<MachineInstr*> Index2MiMap;
00086     Index2MiMap i2miMap_;
00087 
00088     typedef DenseMap<unsigned, LiveInterval*> Reg2IntervalMap;
00089     Reg2IntervalMap r2iMap_;
00090 
00091     BitVector allocatableRegs_;
00092 
00093     std::vector<MachineInstr*> ClonedMIs;
00094 
00095   public:
00096     static char ID; // Pass identification, replacement for typeid
00097     LiveIntervals() : MachineFunctionPass(&ID) {}
00098 
00099     struct InstrSlots {
00100       enum {
00101         LOAD  = 0,
00102         USE   = 1,
00103         DEF   = 2,
00104         STORE = 3,
00105         NUM   = 4
00106       };
00107     };
00108 
00109     static unsigned getBaseIndex(unsigned index) {
00110       return index - (index % InstrSlots::NUM);
00111     }
00112     static unsigned getBoundaryIndex(unsigned index) {
00113       return getBaseIndex(index + InstrSlots::NUM - 1);
00114     }
00115     static unsigned getLoadIndex(unsigned index) {
00116       return getBaseIndex(index) + InstrSlots::LOAD;
00117     }
00118     static unsigned getUseIndex(unsigned index) {
00119       return getBaseIndex(index) + InstrSlots::USE;
00120     }
00121     static unsigned getDefIndex(unsigned index) {
00122       return getBaseIndex(index) + InstrSlots::DEF;
00123     }
00124     static unsigned getStoreIndex(unsigned index) {
00125       return getBaseIndex(index) + InstrSlots::STORE;
00126     }
00127 
00128     static float getSpillWeight(bool isDef, bool isUse, unsigned loopDepth) {
00129       return (isDef + isUse) * powf(10.0F, (float)loopDepth);
00130     }
00131 
00132     typedef Reg2IntervalMap::iterator iterator;
00133     typedef Reg2IntervalMap::const_iterator const_iterator;
00134     const_iterator begin() const { return r2iMap_.begin(); }
00135     const_iterator end() const { return r2iMap_.end(); }
00136     iterator begin() { return r2iMap_.begin(); }
00137     iterator end() { return r2iMap_.end(); }
00138     unsigned getNumIntervals() const { return (unsigned)r2iMap_.size(); }
00139 
00140     LiveInterval &getInterval(unsigned reg) {
00141       Reg2IntervalMap::iterator I = r2iMap_.find(reg);
00142       assert(I != r2iMap_.end() && "Interval does not exist for register");
00143       return *I->second;
00144     }
00145 
00146     const LiveInterval &getInterval(unsigned reg) const {
00147       Reg2IntervalMap::const_iterator I = r2iMap_.find(reg);
00148       assert(I != r2iMap_.end() && "Interval does not exist for register");
00149       return *I->second;
00150     }
00151 
00152     bool hasInterval(unsigned reg) const {
00153       return r2iMap_.count(reg);
00154     }
00155 
00156     /// getMBBStartIdx - Return the base index of the first instruction in the
00157     /// specified MachineBasicBlock.
00158     unsigned getMBBStartIdx(MachineBasicBlock *MBB) const {
00159       return getMBBStartIdx(MBB->getNumber());
00160     }
00161     unsigned getMBBStartIdx(unsigned MBBNo) const {
00162       assert(MBBNo < MBB2IdxMap.size() && "Invalid MBB number!");
00163       return MBB2IdxMap[MBBNo].first;
00164     }
00165 
00166     /// getMBBEndIdx - Return the store index of the last instruction in the
00167     /// specified MachineBasicBlock.
00168     unsigned getMBBEndIdx(MachineBasicBlock *MBB) const {
00169       return getMBBEndIdx(MBB->getNumber());
00170     }
00171     unsigned getMBBEndIdx(unsigned MBBNo) const {
00172       assert(MBBNo < MBB2IdxMap.size() && "Invalid MBB number!");
00173       return MBB2IdxMap[MBBNo].second;
00174     }
00175 
00176     /// getScaledIntervalSize - get the size of an interval in "units,"
00177     /// where every function is composed of one thousand units.  This
00178     /// measure scales properly with empty index slots in the function.
00179     double getScaledIntervalSize(LiveInterval& I) {
00180       return (1000.0 / InstrSlots::NUM * I.getSize()) / i2miMap_.size();
00181     }
00182     
00183     /// getApproximateInstructionCount - computes an estimate of the number
00184     /// of instructions in a given LiveInterval.
00185     unsigned getApproximateInstructionCount(LiveInterval& I) {
00186       double IntervalPercentage = getScaledIntervalSize(I) / 1000.0;
00187       return (unsigned)(IntervalPercentage * FunctionSize);
00188     }
00189 
00190     /// getMBBFromIndex - given an index in any instruction of an
00191     /// MBB return a pointer the MBB
00192     MachineBasicBlock* getMBBFromIndex(unsigned index) const {
00193       std::vector<IdxMBBPair>::const_iterator I =
00194         std::lower_bound(Idx2MBBMap.begin(), Idx2MBBMap.end(), index);
00195       // Take the pair containing the index
00196       std::vector<IdxMBBPair>::const_iterator J =
00197         ((I != Idx2MBBMap.end() && I->first > index) ||
00198          (I == Idx2MBBMap.end() && Idx2MBBMap.size()>0)) ? (I-1): I;
00199 
00200       assert(J != Idx2MBBMap.end() && J->first < index+1 &&
00201              index <= getMBBEndIdx(J->second) &&
00202              "index does not correspond to an MBB");
00203       return J->second;
00204     }
00205 
00206     /// getInstructionIndex - returns the base index of instr
00207     unsigned getInstructionIndex(MachineInstr* instr) const {
00208       Mi2IndexMap::const_iterator it = mi2iMap_.find(instr);
00209       assert(it != mi2iMap_.end() && "Invalid instruction!");
00210       return it->second;
00211     }
00212 
00213     /// getInstructionFromIndex - given an index in any slot of an
00214     /// instruction return a pointer the instruction
00215     MachineInstr* getInstructionFromIndex(unsigned index) const {
00216       index /= InstrSlots::NUM; // convert index to vector index
00217       assert(index < i2miMap_.size() &&
00218              "index does not correspond to an instruction");
00219       return i2miMap_[index];
00220     }
00221 
00222     /// hasGapBeforeInstr - Return true if the previous instruction slot,
00223     /// i.e. Index - InstrSlots::NUM, is not occupied.
00224     bool hasGapBeforeInstr(unsigned Index) {
00225       Index = getBaseIndex(Index - InstrSlots::NUM);
00226       return getInstructionFromIndex(Index) == 0;
00227     }
00228 
00229     /// findGapBeforeInstr - Find an empty instruction slot before the
00230     /// specified index. If "Furthest" is true, find one that's furthest
00231     /// away from the index (but before any index that's occupied).
00232     unsigned findGapBeforeInstr(unsigned Index, bool Furthest = false) {
00233       Index = getBaseIndex(Index - InstrSlots::NUM);
00234       if (getInstructionFromIndex(Index))
00235         return 0;  // No gap!
00236       if (!Furthest)
00237         return Index;
00238       unsigned PrevIndex = getBaseIndex(Index - InstrSlots::NUM);
00239       while (getInstructionFromIndex(Index)) {
00240         Index = PrevIndex;
00241         PrevIndex = getBaseIndex(Index - InstrSlots::NUM);
00242       }
00243       return Index;
00244     }
00245 
00246     /// InsertMachineInstrInMaps - Insert the specified machine instruction
00247     /// into the instruction index map at the given index.
00248     void InsertMachineInstrInMaps(MachineInstr *MI, unsigned Index) {
00249       i2miMap_[Index / InstrSlots::NUM] = MI;
00250       Mi2IndexMap::iterator it = mi2iMap_.find(MI);
00251       assert(it == mi2iMap_.end() && "Already in map!");
00252       mi2iMap_[MI] = Index;
00253     }
00254 
00255     /// conflictsWithPhysRegDef - Returns true if the specified register
00256     /// is defined during the duration of the specified interval.
00257     bool conflictsWithPhysRegDef(const LiveInterval &li, VirtRegMap &vrm,
00258                                  unsigned reg);
00259 
00260     /// conflictsWithPhysRegRef - Similar to conflictsWithPhysRegRef except
00261     /// it can check use as well.
00262     bool conflictsWithPhysRegRef(LiveInterval &li, unsigned Reg,
00263                                  bool CheckUse,
00264                                  SmallPtrSet<MachineInstr*,32> &JoinedCopies);
00265 
00266     /// findLiveInMBBs - Given a live range, if the value of the range
00267     /// is live in any MBB returns true as well as the list of basic blocks
00268     /// in which the value is live.
00269     bool findLiveInMBBs(unsigned Start, unsigned End,
00270                         SmallVectorImpl<MachineBasicBlock*> &MBBs) const;
00271 
00272     /// findReachableMBBs - Return a list MBB that can be reached via any
00273     /// branch or fallthroughs. Return true if the list is not empty.
00274     bool findReachableMBBs(unsigned Start, unsigned End,
00275                         SmallVectorImpl<MachineBasicBlock*> &MBBs) const;
00276 
00277     // Interval creation
00278 
00279     LiveInterval &getOrCreateInterval(unsigned reg) {
00280       Reg2IntervalMap::iterator I = r2iMap_.find(reg);
00281       if (I == r2iMap_.end())
00282         I = r2iMap_.insert(std::make_pair(reg, createInterval(reg))).first;
00283       return *I->second;
00284     }
00285 
00286     /// dupInterval - Duplicate a live interval. The caller is responsible for
00287     /// managing the allocated memory.
00288     LiveInterval *dupInterval(LiveInterval *li);
00289     
00290     /// addLiveRangeToEndOfBlock - Given a register and an instruction,
00291     /// adds a live range from that instruction to the end of its MBB.
00292     LiveRange addLiveRangeToEndOfBlock(unsigned reg,
00293                                         MachineInstr* startInst);
00294 
00295     // Interval removal
00296 
00297     void removeInterval(unsigned Reg) {
00298       DenseMap<unsigned, LiveInterval*>::iterator I = r2iMap_.find(Reg);
00299       delete I->second;
00300       r2iMap_.erase(I);
00301     }
00302 
00303     /// isRemoved - returns true if the specified machine instr has been
00304     /// removed.
00305     bool isRemoved(MachineInstr* instr) const {
00306       return !mi2iMap_.count(instr);
00307     }
00308 
00309     /// RemoveMachineInstrFromMaps - This marks the specified machine instr as
00310     /// deleted.
00311     void RemoveMachineInstrFromMaps(MachineInstr *MI) {
00312       // remove index -> MachineInstr and
00313       // MachineInstr -> index mappings
00314       Mi2IndexMap::iterator mi2i = mi2iMap_.find(MI);
00315       if (mi2i != mi2iMap_.end()) {
00316         i2miMap_[mi2i->second/InstrSlots::NUM] = 0;
00317         mi2iMap_.erase(mi2i);
00318       }
00319     }
00320 
00321     /// ReplaceMachineInstrInMaps - Replacing a machine instr with a new one in
00322     /// maps used by register allocator.
00323     void ReplaceMachineInstrInMaps(MachineInstr *MI, MachineInstr *NewMI) {
00324       Mi2IndexMap::iterator mi2i = mi2iMap_.find(MI);
00325       if (mi2i == mi2iMap_.end())
00326         return;
00327       i2miMap_[mi2i->second/InstrSlots::NUM] = NewMI;
00328       Mi2IndexMap::iterator it = mi2iMap_.find(MI);
00329       assert(it != mi2iMap_.end() && "Invalid instruction!");
00330       unsigned Index = it->second;
00331       mi2iMap_.erase(it);
00332       mi2iMap_[NewMI] = Index;
00333     }
00334 
00335     BumpPtrAllocator& getVNInfoAllocator() { return VNInfoAllocator; }
00336 
00337     /// getVNInfoSourceReg - Helper function that parses the specified VNInfo
00338     /// copy field and returns the source register that defines it.
00339     unsigned getVNInfoSourceReg(const VNInfo *VNI) const;
00340 
00341     virtual void getAnalysisUsage(AnalysisUsage &AU) const;
00342     virtual void releaseMemory();
00343 
00344     /// runOnMachineFunction - pass entry point
00345     virtual bool runOnMachineFunction(MachineFunction&);
00346 
00347     /// print - Implement the dump method.
00348     virtual void print(std::ostream &O, const Module* = 0) const;
00349     void print(std::ostream *O, const Module* M = 0) const {
00350       if (O) print(*O, M);
00351     }
00352 
00353     /// addIntervalsForSpills - Create new intervals for spilled defs / uses of
00354     /// the given interval. FIXME: It also returns the weight of the spill slot
00355     /// (if any is created) by reference. This is temporary.
00356     std::vector<LiveInterval*>
00357     addIntervalsForSpills(const LiveInterval& i,
00358                           SmallVectorImpl<LiveInterval*> &SpillIs,
00359                           const MachineLoopInfo *loopInfo, VirtRegMap& vrm,
00360                           float &SSWeight);
00361     
00362     /// addIntervalsForSpillsFast - Quickly create new intervals for spilled
00363     /// defs / uses without remat or splitting.
00364     std::vector<LiveInterval*>
00365     addIntervalsForSpillsFast(const LiveInterval &li,
00366                               const MachineLoopInfo *loopInfo,
00367                               VirtRegMap &vrm, float& SSWeight);
00368 
00369     /// spillPhysRegAroundRegDefsUses - Spill the specified physical register
00370     /// around all defs and uses of the specified interval.
00371     void spillPhysRegAroundRegDefsUses(const LiveInterval &li,
00372                                        unsigned PhysReg, VirtRegMap &vrm);
00373 
00374     /// isReMaterializable - Returns true if every definition of MI of every
00375     /// val# of the specified interval is re-materializable. Also returns true
00376     /// by reference if all of the defs are load instructions.
00377     bool isReMaterializable(const LiveInterval &li,
00378                             SmallVectorImpl<LiveInterval*> &SpillIs,
00379                             bool &isLoad);
00380 
00381     /// isReMaterializable - Returns true if the definition MI of the specified
00382     /// val# of the specified interval is re-materializable.
00383     bool isReMaterializable(const LiveInterval &li, const VNInfo *ValNo,
00384                             MachineInstr *MI);
00385 
00386     /// getRepresentativeReg - Find the largest super register of the specified
00387     /// physical register.
00388     unsigned getRepresentativeReg(unsigned Reg) const;
00389 
00390     /// getNumConflictsWithPhysReg - Return the number of uses and defs of the
00391     /// specified interval that conflicts with the specified physical register.
00392     unsigned getNumConflictsWithPhysReg(const LiveInterval &li,
00393                                         unsigned PhysReg) const;
00394 
00395     /// computeNumbering - Compute the index numbering.
00396     void computeNumbering();
00397 
00398     /// intervalIsInOneMBB - Returns true if the specified interval is entirely
00399     /// within a single basic block.
00400     bool intervalIsInOneMBB(const LiveInterval &li) const;
00401 
00402   private:      
00403     /// computeIntervals - Compute live intervals.
00404     void computeIntervals();
00405     
00406     /// handleRegisterDef - update intervals for a register def
00407     /// (calls handlePhysicalRegisterDef and
00408     /// handleVirtualRegisterDef)
00409     void handleRegisterDef(MachineBasicBlock *MBB,
00410                            MachineBasicBlock::iterator MI, unsigned MIIdx,
00411                            MachineOperand& MO, unsigned MOIdx);
00412 
00413     /// handleVirtualRegisterDef - update intervals for a virtual
00414     /// register def
00415     void handleVirtualRegisterDef(MachineBasicBlock *MBB,
00416                                   MachineBasicBlock::iterator MI,
00417                                   unsigned MIIdx, MachineOperand& MO,
00418                                   unsigned MOIdx, LiveInterval& interval);
00419 
00420     /// handlePhysicalRegisterDef - update intervals for a physical register
00421     /// def.
00422     void handlePhysicalRegisterDef(MachineBasicBlock* mbb,
00423                                    MachineBasicBlock::iterator mi,
00424                                    unsigned MIIdx, MachineOperand& MO,
00425                                    LiveInterval &interval,
00426                                    MachineInstr *CopyMI);
00427 
00428     /// handleLiveInRegister - Create interval for a livein register.
00429     void handleLiveInRegister(MachineBasicBlock* mbb,
00430                               unsigned MIIdx,
00431                               LiveInterval &interval, bool isAlias = false);
00432 
00433     /// getReMatImplicitUse - If the remat definition MI has one (for now, we
00434     /// only allow one) virtual register operand, then its uses are implicitly
00435     /// using the register. Returns the virtual register.
00436     unsigned getReMatImplicitUse(const LiveInterval &li,
00437                                  MachineInstr *MI) const;
00438 
00439     /// isValNoAvailableAt - Return true if the val# of the specified interval
00440     /// which reaches the given instruction also reaches the specified use
00441     /// index.
00442     bool isValNoAvailableAt(const LiveInterval &li, MachineInstr *MI,
00443                             unsigned UseIdx) const;
00444 
00445     /// isReMaterializable - Returns true if the definition MI of the specified
00446     /// val# of the specified interval is re-materializable. Also returns true
00447     /// by reference if the def is a load.
00448     bool isReMaterializable(const LiveInterval &li, const VNInfo *ValNo,
00449                             MachineInstr *MI,
00450                             SmallVectorImpl<LiveInterval*> &SpillIs,
00451                             bool &isLoad);
00452 
00453     /// tryFoldMemoryOperand - Attempts to fold either a spill / restore from
00454     /// slot / to reg or any rematerialized load into ith operand of specified
00455     /// MI. If it is successul, MI is updated with the newly created MI and
00456     /// returns true.
00457     bool tryFoldMemoryOperand(MachineInstr* &MI, VirtRegMap &vrm,
00458                               MachineInstr *DefMI, unsigned InstrIdx,
00459                               SmallVector<unsigned, 2> &Ops,
00460                               bool isSS, int Slot, unsigned Reg);
00461 
00462     /// canFoldMemoryOperand - Return true if the specified load / store
00463     /// folding is possible.
00464     bool canFoldMemoryOperand(MachineInstr *MI,
00465                               SmallVector<unsigned, 2> &Ops,
00466                               bool ReMatLoadSS) const;
00467 
00468     /// anyKillInMBBAfterIdx - Returns true if there is a kill of the specified
00469     /// VNInfo that's after the specified index but is within the basic block.
00470     bool anyKillInMBBAfterIdx(const LiveInterval &li, const VNInfo *VNI,
00471                               MachineBasicBlock *MBB, unsigned Idx) const;
00472 
00473     /// hasAllocatableSuperReg - Return true if the specified physical register
00474     /// has any super register that's allocatable.
00475     bool hasAllocatableSuperReg(unsigned Reg) const;
00476 
00477     /// SRInfo - Spill / restore info.
00478     struct SRInfo {
00479       int index;
00480       unsigned vreg;
00481       bool canFold;
00482       SRInfo(int i, unsigned vr, bool f) : index(i), vreg(vr), canFold(f) {};
00483     };
00484 
00485     bool alsoFoldARestore(int Id, int index, unsigned vr,
00486                           BitVector &RestoreMBBs,
00487                           DenseMap<unsigned,std::vector<SRInfo> >&RestoreIdxes);
00488     void eraseRestoreInfo(int Id, int index, unsigned vr,
00489                           BitVector &RestoreMBBs,
00490                           DenseMap<unsigned,std::vector<SRInfo> >&RestoreIdxes);
00491 
00492     /// handleSpilledImpDefs - Remove IMPLICIT_DEF instructions which are being
00493     /// spilled and create empty intervals for their uses.
00494     void handleSpilledImpDefs(const LiveInterval &li, VirtRegMap &vrm,
00495                               const TargetRegisterClass* rc,
00496                               std::vector<LiveInterval*> &NewLIs);
00497 
00498     /// rewriteImplicitOps - Rewrite implicit use operands of MI (i.e. uses of
00499     /// interval on to-be re-materialized operands of MI) with new register.
00500     void rewriteImplicitOps(const LiveInterval &li,
00501                            MachineInstr *MI, unsigned NewVReg, VirtRegMap &vrm);
00502 
00503     /// rewriteInstructionForSpills, rewriteInstructionsForSpills - Helper
00504     /// functions for addIntervalsForSpills to rewrite uses / defs for the given
00505     /// live range.
00506     bool rewriteInstructionForSpills(const LiveInterval &li, const VNInfo *VNI,
00507         bool TrySplit, unsigned index, unsigned end, MachineInstr *MI,
00508         MachineInstr *OrigDefMI, MachineInstr *DefMI, unsigned Slot, int LdSlot,
00509         bool isLoad, bool isLoadSS, bool DefIsReMat, bool CanDelete,
00510         VirtRegMap &vrm, const TargetRegisterClass* rc,
00511         SmallVector<int, 4> &ReMatIds, const MachineLoopInfo *loopInfo,
00512         unsigned &NewVReg, unsigned ImpUse, bool &HasDef, bool &HasUse,
00513         DenseMap<unsigned,unsigned> &MBBVRegsMap,
00514         std::vector<LiveInterval*> &NewLIs, float &SSWeight);
00515     void rewriteInstructionsForSpills(const LiveInterval &li, bool TrySplit,
00516         LiveInterval::Ranges::const_iterator &I,
00517         MachineInstr *OrigDefMI, MachineInstr *DefMI, unsigned Slot, int LdSlot,
00518         bool isLoad, bool isLoadSS, bool DefIsReMat, bool CanDelete,
00519         VirtRegMap &vrm, const TargetRegisterClass* rc,
00520         SmallVector<int, 4> &ReMatIds, const MachineLoopInfo *loopInfo,
00521         BitVector &SpillMBBs,
00522         DenseMap<unsigned,std::vector<SRInfo> > &SpillIdxes,
00523         BitVector &RestoreMBBs,
00524         DenseMap<unsigned,std::vector<SRInfo> > &RestoreIdxes,
00525         DenseMap<unsigned,unsigned> &MBBVRegsMap,
00526         std::vector<LiveInterval*> &NewLIs, float &SSWeight);
00527 
00528     static LiveInterval* createInterval(unsigned Reg);
00529 
00530     void printRegName(unsigned reg) const;
00531   };
00532 
00533 } // End llvm namespace
00534 
00535 #endif