mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-02 00:37:09 +00:00
Make a method const, no functionality changes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@15193 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
1d6dc97463
commit
d3a205eab5
@ -112,7 +112,7 @@ namespace llvm {
|
||||
|
||||
/// getLiveRangeContaining - Return the live range that contains the
|
||||
/// specified index, or null if there is none.
|
||||
LiveRange *getLiveRangeContaining(unsigned Idx);
|
||||
const LiveRange *getLiveRangeContaining(unsigned Idx) const;
|
||||
|
||||
|
||||
/// joinable - Two intervals are joinable if the either don't overlap at all
|
||||
|
@ -237,10 +237,10 @@ void LiveInterval::removeRange(unsigned Start, unsigned End) {
|
||||
|
||||
/// getLiveRangeContaining - Return the live range that contains the
|
||||
/// specified index, or null if there is none.
|
||||
LiveRange *LiveInterval::getLiveRangeContaining(unsigned Idx) {
|
||||
Ranges::iterator It = std::upper_bound(ranges.begin(), ranges.end(), Idx);
|
||||
const LiveRange *LiveInterval::getLiveRangeContaining(unsigned Idx) const {
|
||||
Ranges::const_iterator It = std::upper_bound(ranges.begin(),ranges.end(),Idx);
|
||||
if (It != ranges.begin()) {
|
||||
LiveRange &LR = *prior(It);
|
||||
const LiveRange &LR = *prior(It);
|
||||
if (LR.contains(Idx))
|
||||
return &LR;
|
||||
}
|
||||
@ -254,8 +254,8 @@ LiveRange *LiveInterval::getLiveRangeContaining(unsigned Idx) {
|
||||
/// is the result of a copy instruction in the source program, that occurs at
|
||||
/// index 'CopyIdx' that copies from 'Other' to 'this'.
|
||||
void LiveInterval::join(LiveInterval &Other, unsigned CopyIdx) {
|
||||
LiveRange *SourceLR = Other.getLiveRangeContaining(CopyIdx-1);
|
||||
LiveRange *DestLR = getLiveRangeContaining(CopyIdx);
|
||||
const LiveRange *SourceLR = Other.getLiveRangeContaining(CopyIdx-1);
|
||||
const LiveRange *DestLR = getLiveRangeContaining(CopyIdx);
|
||||
assert(SourceLR && DestLR && "Not joining due to a copy?");
|
||||
unsigned MergedSrcValIdx = SourceLR->ValId;
|
||||
unsigned MergedDstValIdx = DestLR->ValId;
|
||||
|
@ -112,7 +112,7 @@ namespace llvm {
|
||||
|
||||
/// getLiveRangeContaining - Return the live range that contains the
|
||||
/// specified index, or null if there is none.
|
||||
LiveRange *getLiveRangeContaining(unsigned Idx);
|
||||
const LiveRange *getLiveRangeContaining(unsigned Idx) const;
|
||||
|
||||
|
||||
/// joinable - Two intervals are joinable if the either don't overlap at all
|
||||
|
Loading…
Reference in New Issue
Block a user