search for: replacedvalnos

Displaying 6 results from an estimated 6 matches for "replacedvalnos".

2008 Jan 30
0
[LLVMdev] Possible LiveInterval Bug
...here. Let's say the liverange in question is [13,20) and the interval it's being merged to is something like this: [1, 4), [10, 15) IP = std::upper_bound(IP, end(), Start); if (IP != begin() && IP[-1].end > Start) { if (IP->valno != LHSValNo) { ReplacedValNos.push_back(IP->valno); IP->valno = LHSValNo; // Update val#. } IP is end() and we would be pushing junk into ReplacedValNos. Is this what you saw? I wonder if the fix should be changing the inner if to: if (IP[-1].valno != LHSValNo) { ReplacedValNos.push_back(IP[-1].va...
2008 Jan 30
2
[LLVMdev] Possible LiveInterval Bug
...nge in question is [13,20) > and the interval it's being merged to is something like this: [1, 4), > [10, 15) > > IP = std::upper_bound(IP, end(), Start); > if (IP != begin() && IP[-1].end > Start) { > if (IP->valno != LHSValNo) { > ReplacedValNos.push_back(IP->valno); > IP->valno = LHSValNo; // Update val#. > } > > IP is end() and we would be pushing junk into ReplacedValNos. Is this > what you saw? Yep, exactly. > I wonder if the fix should be changing the inner if to: > if (IP[-1].valno != LH...
2008 Jan 29
2
[LLVMdev] Possible LiveInterval Bug
...eRegisterCoalescing.cpp). There's a call to MergeValueInAsValue at line 50. MergeValueInAsValue has this code: void LiveInterval::MergeValueInAsValue(const LiveInterval &RHS, const VNInfo *RHSValNo, VNInfo *LHSValNo) { SmallVector<VNInfo*, 4> ReplacedValNos; iterator IP = begin(); for (const_iterator I = RHS.begin(), E = RHS.end(); I != E; ++I) { if (I->valno != RHSValNo) continue; unsigned Start = I->start, End = I->end; IP = std::upper_bound(IP, end(), Start); // If the start of this range overlaps with an existing...
2008 Jan 30
2
[LLVMdev] Possible LiveInterval Bug
On Wednesday 30 January 2008 02:02, Evan Cheng wrote: > AFAIK std::upper_bound() would not return end(), right? Yes, it can return end(). In fact that's exactly what I'm seeing. std::upper_bound is just binary search and returns where the element should be inserted to retain ordering. So for example, if my iterator range is over: 1 2 3 4 5 and I call std::upper_bound(begin(),
2008 Jan 30
0
[LLVMdev] Possible LiveInterval Bug
...call to MergeValueInAsValue at line 50. > MergeValueInAsValue has > this code: > > void LiveInterval::MergeValueInAsValue(const LiveInterval &RHS, > const VNInfo *RHSValNo, VNInfo > *LHSValNo) > { > SmallVector<VNInfo*, 4> ReplacedValNos; > iterator IP = begin(); > for (const_iterator I = RHS.begin(), E = RHS.end(); I != E; ++I) { > if (I->valno != RHSValNo) > continue; > unsigned Start = I->start, End = I->end; > IP = std::upper_bound(IP, end(), Start); > // If the start of this ran...
2008 Jan 30
0
[LLVMdev] Possible LiveInterval Bug
...0) >> and the interval it's being merged to is something like this: [1, 4), >> [10, 15) >> >> IP = std::upper_bound(IP, end(), Start); >> if (IP != begin() && IP[-1].end > Start) { >> if (IP->valno != LHSValNo) { >> ReplacedValNos.push_back(IP->valno); >> IP->valno = LHSValNo; // Update val#. >> } >> >> IP is end() and we would be pushing junk into ReplacedValNos. Is this >> what you saw? > > Yep, exactly. > >> I wonder if the fix should be changing the inner...