Add const version of getLiveRangeForValue().

llvm-svn: 7386
This commit is contained in:
Vikram S. Adve 2003-07-29 19:38:22 +00:00
parent 91e75d87d2
commit e2ef34a818
1 changed files with 9 additions and 4 deletions

View File

@ -92,10 +92,15 @@ public:
inline const LiveRangeMapType *getLiveRangeMap() const
{ return &LiveRangeMap; }
// Method sed to get the corresponding live range of a Value
//
inline LiveRange *getLiveRangeForValue( const Value *Val)
{ return LiveRangeMap[Val]; }
// Method used to get the live range containing a Value.
// This may return NULL if no live range exists for a Value (eg, some consts)
inline LiveRange *getLiveRangeForValue(const Value *Val) {
return LiveRangeMap[Val];
}
inline const LiveRange *getLiveRangeForValue(const Value *Val) const {
LiveRangeMapType::const_iterator I = LiveRangeMap.find(Val);
return I->second;
}
// Method for coalescing live ranges. Called only after interference info
// is calculated.