search for: lhsvalno

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

2008 Jan 30
0
[LLVMdev] Possible LiveInterval Bug
Hrm, I see a 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) { Replac...
2008 Jan 30
2
[LLVMdev] Possible LiveInterval Bug
...e. 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? Yep, exactly. > I wonder if the fix should be changing the inner i...
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
...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? > > Yep, exactly. > >> I wonder if...
2008 Jan 29
2
[LLVMdev] Possible LiveInterval Bug
...f aliased registers (around line 473 of SimpleRegisterCoalescing.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); // I...
2008 Jan 30
0
[LLVMdev] Possible LiveInterval Bug
...impleRegisterCoalescing.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_b...