diff options
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp | 1 | ||||
-rw-r--r-- | llvm/lib/CodeGen/InstrSched/SchedPriorities.cpp | 16 | ||||
-rw-r--r-- | llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.h | 8 | ||||
-rw-r--r-- | llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h | 12 |
4 files changed, 16 insertions, 21 deletions
diff --git a/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp b/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp index d625a7b719c..6e6d14c7c89 100644 --- a/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp +++ b/llvm/lib/CodeGen/InstrSched/InstrScheduling.cpp @@ -39,7 +39,6 @@ cl::Enum<enum SchedDebugLevel_t> SchedDebugLevel("dsched", cl::NoFlags, class InstrSchedule; class SchedulingManager; -class DelaySlotInfo; //---------------------------------------------------------------------- diff --git a/llvm/lib/CodeGen/InstrSched/SchedPriorities.cpp b/llvm/lib/CodeGen/InstrSched/SchedPriorities.cpp index e06f84cd670..74f659993e2 100644 --- a/llvm/lib/CodeGen/InstrSched/SchedPriorities.cpp +++ b/llvm/lib/CodeGen/InstrSched/SchedPriorities.cpp @@ -20,7 +20,7 @@ #include "SchedPriorities.h" #include "llvm/Analysis/LiveVar/MethodLiveVarInfo.h" -#include "llvm/Analysis/LiveVar/LiveVarSet.h" +#include "llvm/Analysis/LiveVar/ValueSet.h" #include "Support/PostOrderIterator.h" #include <iostream> using std::cerr; @@ -265,8 +265,7 @@ SchedPriorities::findSetWithMaxDelay(std::vector<candIndex>& mcands, bool SchedPriorities::instructionHasLastUse(MethodLiveVarInfo& methodLiveVarInfo, - const SchedGraphNode* graphNode) -{ + const SchedGraphNode* graphNode) { const MachineInstr* minstr = graphNode->getMachineInstr(); std::hash_map<const MachineInstr*, bool>::const_iterator @@ -277,15 +276,14 @@ SchedPriorities::instructionHasLastUse(MethodLiveVarInfo& methodLiveVarInfo, // else check if instruction is a last use and save it in the hash_map bool hasLastUse = false; const BasicBlock* bb = graphNode->getBB(); - const LiveVarSet* liveVars = + const ValueSet *liveVars = methodLiveVarInfo.getLiveVarSetBeforeMInst(minstr, bb); for (MachineInstr::val_const_op_iterator vo(minstr); ! vo.done(); ++vo) - if (liveVars->find(*vo) == liveVars->end()) - { - hasLastUse = true; - break; - } + if (liveVars->find(*vo) == liveVars->end()) { + hasLastUse = true; + break; + } lastUseMap[minstr] = hasLastUse; return hasLastUse; diff --git a/llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.h b/llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.h index 09aca44f30c..48e81c10682 100644 --- a/llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.h +++ b/llvm/lib/CodeGen/RegAlloc/LiveRangeInfo.h @@ -20,10 +20,10 @@ #define LIVE_RANGE_INFO_H #include "Support/HashExtras.h" +#include "llvm/Analysis/LiveVar/ValueSet.h" class LiveRange; class MachineInstr; -class LiveVarSet; class RegClass; class MachineRegInfo; class TargetMachine; @@ -60,17 +60,15 @@ class LiveRangeInfo { void unionAndUpdateLRs(LiveRange *L1, LiveRange *L2); - void addInterference(const Instruction *const Inst, - const LiveVarSet *const LVSet); + void addInterference(const Instruction *Inst, const ValueSet *LVSet); void suggestRegs4CallRets(); const Method* getMethod() { return Meth; } - public: - LiveRangeInfo(const Method *const M, + LiveRangeInfo(const Method *M, const TargetMachine& tm, std::vector<RegClass *> & RCList); diff --git a/llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h b/llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h index de8d7938388..f3aef1cdc2f 100644 --- a/llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h +++ b/llvm/lib/CodeGen/RegAlloc/PhyRegAlloc.h @@ -98,15 +98,15 @@ private: //------- ------------------ private methods--------------------------------- - void addInterference(const Value *const Def, const LiveVarSet *const LVSet, - const bool isCallInst); + void addInterference(const Value *Def, const ValueSet *LVSet, + bool isCallInst); void addInterferencesForArgs(); void createIGNodeListsAndIGs(); void buildInterferenceGraphs(); void setCallInterferences(const MachineInstr *MInst, - const LiveVarSet *const LVSetAft ); + const ValueSet *LVSetAft ); void move2DelayedInstr(const MachineInstr *OrigMI, const MachineInstr *DelayedMI ); @@ -131,13 +131,13 @@ private: friend class UltraSparcRegInfo; - int getUsableUniRegAtMI(RegClass *RC, const int RegType, + int getUsableUniRegAtMI(RegClass *RC, int RegType, const MachineInstr *MInst, - const LiveVarSet *LVSetBef, MachineInstr *MIBef, + const ValueSet *LVSetBef, MachineInstr *MIBef, MachineInstr *MIAft ); int getUnusedUniRegAtMI(RegClass *RC, const MachineInstr *MInst, - const LiveVarSet *LVSetBef); + const ValueSet *LVSetBef); void setRelRegsUsedByThisInst(RegClass *RC, const MachineInstr *MInst ); int getUniRegNotUsedByThisInst(RegClass *RC, const MachineInstr *MInst); |