Displaying 18 results from an estimated 18 matches for "endx".
Did you mean:
end
2018 Jun 21
4
RFC: Should SmallVectors be smaller?
...raightforward to shave off a couple of pointers (1 pointer/4B on 32-bit; 2 pointers/16B on 64-bit) if users could afford to test for small-mode vs. large-mode.
The current scheme works out to something like this:
```
template <class T, size_t SmallCapacity>
struct SmallVector {
T *BeginX, *EndX, *CapacityX;
T Small[SmallCapacity];
bool isSmall() const { return BeginX == Small; }
T *begin() { return BeginX; }
T *end() { return EndX; }
size_t size() const { return EndX - BeginX; }
size_t capacity() const { return CapacityX - BeginX; }
};
```
In the past I used something more l...
2016 Apr 28
2
Why duplicate "protected:" in SmallVector.h, StringMap.h?
In SmallVector.h:
class SmallVectorBase {
*protected:*
void *BeginX, *EndX, *CapacityX;
*protected:*
SmallVectorBase(void *FirstEl, size_t Size)
: BeginX(FirstEl), EndX(FirstEl), CapacityX((char*)FirstEl+Size) {}
In StringMap.h:
class StringMapImpl {
*protected:*
// Array of NumBuckets pointers to entries, null pointers are holes.
// TheTable[NumBuckets] con...
2010 Jul 04
2
[LLVMdev] Question about SmallVector implementation detail
Hello,
I have just a little question about the SmallVector implemention.
In SmallVectorImpl, the following method is currently implemented as:
void push_back(const T &Elt) {
if (this->EndX < this->CapacityX) {
Retry:
new (this->end()) T(Elt);
this->setEnd(this->end()+1);
return;
}
this->grow();
goto Retry;
}
~/llvm-project/llvm/include/llvm/ADT/SmallVector.h:327 (svn rev: 107560)
This function was wrote/last modified by lattner....
2010 Jul 04
0
[LLVMdev] Question about SmallVector implementation detail
On Jul 4, 2010, at 12:04 AM, bombela wrote:
> Hello,
>
> I have just a little question about the SmallVector implemention.
>
> In SmallVectorImpl, the following method is currently implemented as:
>
> void push_back(const T &Elt) {
> if (this->EndX < this->CapacityX) {
> Retry:
> new (this->end()) T(Elt);
> this->setEnd(this->end()+1);
> return;
> }
> this->grow();
> goto Retry;
> }
>
> ~/llvm-project/llvm/include/llvm/ADT/SmallVector.h:327 (svn rev: 107560)...
2016 Sep 14
4
setDataLayout segfault
...64-f80:128-n8:16:32:64-S128
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff5f65832 in llvm::SmallVectorTemplateCommon<unsigned char,
void>::end (this=0x148) at
/home/fwinter/svn/llvm-3.9/include/llvm/ADT/SmallVector.h:117
117 iterator end() { return (iterator)this->EndX; }
(gdb) bt
#0 0x00007ffff5f65832 in llvm::SmallVectorTemplateCommon<unsigned char,
void>::end (this=0x148) at
/home/fwinter/svn/llvm-3.9/include/llvm/ADT/SmallVector.h:117
#1 llvm::SmallVectorImpl<unsigned char>::clear (this=0x148) at
/home/fwinter/svn/llvm-3.9/include/llvm/ADT/Sm...
2015 Apr 19
6
[LLVMdev] SmallString + raw_svector_ostream combination should be more efficient
A very common code pattern in LLVM is
SmallString<128> S;
raw_svector_ostream OS(S);
OS<< ...
Use OS.str()
While raw_svector_ostream is smart to share the text buffer itself, it's
inefficient keeping two sets of pointers to the same buffer:
In SmallString: void *BeginX, *EndX, *CapacityX
In raw_ostream: char *OutBufStart, *OutBufEnd, *OutBufCur
Moreover, at runtime the two sets of pointers need to be coordinated
between the SmallString and raw_svector_ostream using
raw_svector_ostream::init, raw_svector_ostream::pwrite,
raw_svector_ostream::resync
and raw_svector_ostr...
2018 Jun 22
3
RFC: Should SmallVectors be smaller?
...fork the data structure.
If no one has measured before I might try it some time.
> -Chris
>
>
>>
>> The current scheme works out to something like this:
>> ```
>> template <class T, size_t SmallCapacity>
>> struct SmallVector {
>> T *BeginX, *EndX, *CapacityX;
>> T Small[SmallCapacity];
>>
>> bool isSmall() const { return BeginX == Small; }
>> T *begin() { return BeginX; }
>> T *end() { return EndX; }
>> size_t size() const { return EndX - BeginX; }
>> size_t capacity() const { return CapacityX - Be...
2016 Sep 14
2
setDataLayout segfault
...received signal SIGSEGV, Segmentation fault.
>> 0x00007ffff5f65832 in llvm::SmallVectorTemplateCommon<unsigned char,
>> void>::end (this=0x148) at
>> /home/fwinter/svn/llvm-3.9/include/llvm/ADT/SmallVector.h:117
>> 117 iterator end() { return (iterator)this->EndX; }
>> (gdb) bt
>> #0 0x00007ffff5f65832 in llvm::SmallVectorTemplateCommon<unsigned
>> char, void>::end (this=0x148) at
>> /home/fwinter/svn/llvm-3.9/include/llvm/ADT/SmallVector.h:117
>> #1 llvm::SmallVectorImpl<unsigned char>::clear (this=0x148) at
&...
2016 Jun 01
1
GDB pretty printers for LLVM ADTs
...uot;\"\"\n"
.ascii "\n"
.ascii " def __init__(self, val):\n"
.ascii " self.val = val\n"
.ascii "\n"
.ascii " def to_string(self):\n"
.ascii " begin = self.val['BeginX']\n"
.ascii " end = self.val['EndX']\n"
.ascii " return
begin.cast(gdb.lookup_type(\"char\").pointer()).string(length = end -
begin)\n"
.ascii "\n"
.ascii " def display_hint (self):\n"
.ascii " return 'string'\n"
...
.ascii "pp = gdb.printing.RegexpColle...
2015 Apr 20
2
[LLVMdev] SmallString + raw_svector_ostream combination should be more efficient
...>> raw_svector_ostream OS(S);
>> OS<< ...
>> Use OS.str()
>>
>> While raw_svector_ostream is smart to share the text buffer itself, it's
>> inefficient keeping two sets of pointers to the same buffer:
>>
>> In SmallString: void *BeginX, *EndX, *CapacityX
>> In raw_ostream: char *OutBufStart, *OutBufEnd, *OutBufCur
>>
>> Moreover, at runtime the two sets of pointers need to be coordinated
>> between the SmallString and raw_svector_ostream using
>> raw_svector_ostream::init, raw_svector_ostream::pwrite, raw_...
2015 Apr 30
2
[LLVMdev] SmallString + raw_svector_ostream combination should be more efficient
...S<< ...
>>>> Use OS.str()
>>>>
>>>> While raw_svector_ostream is smart to share the text buffer itself, it's
>>>> inefficient keeping two sets of pointers to the same buffer:
>>>>
>>>> In SmallString: void *BeginX, *EndX, *CapacityX
>>>> In raw_ostream: char *OutBufStart, *OutBufEnd, *OutBufCur
>>>>
>>>> Moreover, at runtime the two sets of pointers need to be coordinated
>>>> between the SmallString and raw_svector_ostream using
>>>> raw_svector_ostream:...
2011 Jun 24
2
[LLVMdev] Infinite loop in llc on ARMv7 (LLVM HEAD from June 17)
...re in llvm::SmallVectorImpl. Two backtraces obtained with 10
seconds delay are:
0x0099be14 in llvm::SmallVectorTemplateCommon<llvm::SDNode*>::setEnd
(this=0x7ee90b38, P=0x5c06988)
at /export/home/karel/vcs/llvm-head/include/llvm/ADT/SmallVector.h:103
103 void setEnd(T *P) { this->EndX = P; }
(gdb) where
#0 0x0099be14 in llvm::SmallVectorTemplateCommon<llvm::SDNode*>::setEnd
(this=0x7ee90b38,
P=0x5c06988) at
/export/home/karel/vcs/llvm-head/include/llvm/ADT/SmallVector.h:103
#1 0x00a4849c in llvm::SmallVectorImpl<llvm::SDNode*>::pop_back
(this=0x7ee90b38)...
2015 May 02
2
[LLVMdev] SmallString + raw_svector_ostream combination should be more efficient
...>>>>
>> >>>> While raw_svector_ostream is smart to share the text buffer itself,
>> it's
>> >>>> inefficient keeping two sets of pointers to the same buffer:
>> >>>>
>> >>>> In SmallString: void *BeginX, *EndX, *CapacityX
>> >>>> In raw_ostream: char *OutBufStart, *OutBufEnd, *OutBufCur
>> >>>>
>> >>>> Moreover, at runtime the two sets of pointers need to be coordinated
>> >>>> between the SmallString and raw_svector_ostream using
&...
2015 Aug 12
2
SmallString + raw_svector_ostream combination should be more efficient
...r
> >>>>>> >>>> itself, it's
> >>>>>> >>>> inefficient keeping two sets of pointers to the same buffer:
> >>>>>> >>>>
> >>>>>> >>>> In SmallString: void *BeginX, *EndX, *CapacityX
> >>>>>> >>>> In raw_ostream: char *OutBufStart, *OutBufEnd, *OutBufCur
> >>>>>> >>>>
> >>>>>> >>>> Moreover, at runtime the two sets of pointers need to be
> >>>>>>...
2011 Jun 24
0
[LLVMdev] Infinite loop in llc on ARMv7 (LLVM HEAD from June 17)
...wo backtraces obtained with 10
> seconds delay are:
>
> 0x0099be14 in llvm::SmallVectorTemplateCommon<llvm::SDNode*>::setEnd
> (this=0x7ee90b38, P=0x5c06988)
> at /export/home/karel/vcs/llvm-head/include/llvm/ADT/SmallVector.h:103
> 103 void setEnd(T *P) { this->EndX = P; }
> (gdb) where
> #0 0x0099be14 in llvm::SmallVectorTemplateCommon<llvm::SDNode*>::setEnd
> (this=0x7ee90b38,
> P=0x5c06988) at
> /export/home/karel/vcs/llvm-head/include/llvm/ADT/SmallVector.h:103
> #1 0x00a4849c in llvm::SmallVectorImpl<llvm::SDNode*>::pop...
2015 May 22
2
[LLVMdev] SmallString + raw_svector_ostream combination should be more efficient
...raw_svector_ostream is smart to share the text buffer
>>>>> itself, it's
>>>>> >>>> inefficient keeping two sets of pointers to the same buffer:
>>>>> >>>>
>>>>> >>>> In SmallString: void *BeginX, *EndX, *CapacityX
>>>>> >>>> In raw_ostream: char *OutBufStart, *OutBufEnd, *OutBufCur
>>>>> >>>>
>>>>> >>>> Moreover, at runtime the two sets of pointers need to be
>>>>> coordinated
>>>>> >...
2015 May 02
2
[LLVMdev] SmallString + raw_svector_ostream combination should be more efficient
...;>> >>>> While raw_svector_ostream is smart to share the text buffer itself,
>>> it's
>>> >>>> inefficient keeping two sets of pointers to the same buffer:
>>> >>>>
>>> >>>> In SmallString: void *BeginX, *EndX, *CapacityX
>>> >>>> In raw_ostream: char *OutBufStart, *OutBufEnd, *OutBufCur
>>> >>>>
>>> >>>> Moreover, at runtime the two sets of pointers need to be coordinated
>>> >>>> between the SmallString and raw_svector...
2015 Aug 13
2
SmallString + raw_svector_ostream combination should be more efficient
...> >>>> itself, it's
> >> >>>>>> >>>> inefficient keeping two sets of pointers to the same buffer:
> >> >>>>>> >>>>
> >> >>>>>> >>>> In SmallString: void *BeginX, *EndX, *CapacityX
> >> >>>>>> >>>> In raw_ostream: char *OutBufStart, *OutBufEnd, *OutBufCur
> >> >>>>>> >>>>
> >> >>>>>> >>>> Moreover, at runtime the two sets of pointers need to be
>...