Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] Question about SmallVector implementation detail"
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);
>
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] contains a sentinel value
2018 Jun 21
4
RFC: Should SmallVectors be smaller?
I've been curious for a while whether SmallVectors have the right speed/memory tradeoff. It would be straightforward 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
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
2011 Jun 24
2
[LLVMdev] Infinite loop in llc on ARMv7 (LLVM HEAD from June 17)
Hello,
it looks like I do have infinite loop in llc on linux/armv7 platform
somewhere 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; }
2015 Apr 20
2
[LLVMdev] SmallString + raw_svector_ostream combination should be more efficient
Sean, thanks for reminding this, Alp did commit a class derived from
raw_svector_ostream conatining an internal SmallString he called
small_string_ostream.
The commit was reverted after a day due to a disagreement about the commit
approval and apparently abandoned.
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140623/223393.html
2015 Apr 30
2
[LLVMdev] SmallString + raw_svector_ostream combination should be more efficient
I don't think we should make flush virtual. Why do you need to do it?
Can't you set up the base class to write to use the tail of the memory
region as the buffer?
On 24 April 2015 at 06:46, Yaron Keren <yaron.keren at gmail.com> wrote:
> Hi,
>
> Is this what you're thinking about?
> The code is not tested yet, I'd like to know if the overall direction and
>
2015 May 02
2
[LLVMdev] SmallString + raw_svector_ostream combination should be more efficient
Could you dig into why:
+ raw_ostream &write(unsigned char C) override {
+ grow(1);
+ *OutBufCur++ = C;
+ return *this;
+ }
Is 3 times as fast as raw_svector_ostream? I don't see a good reason why
that should be any faster than:
raw_ostream &operator<<(char C) {
if (OutBufCur >= OutBufEnd)
return write(C);
*OutBufCur++ = C;
return *this;
}
2018 Jun 22
3
RFC: Should SmallVectors be smaller?
>> On Jun 21, 2018, at 18:38, Chris Lattner <clattner at nondot.org> wrote:
>>
>>
>>
>> On Jun 21, 2018, at 9:52 AM, Duncan P. N. Exon Smith via llvm-dev <llvm-dev at lists.llvm.org> wrote:
>>
>> I've been curious for a while whether SmallVectors have the right speed/memory tradeoff. It would be straightforward to shave off a couple of
2015 Aug 12
2
SmallString + raw_svector_ostream combination should be more efficient
+llvm-dev at lists.llvm.org
The impact should be small as all the other streamers usually write
directly to the memory buffer and only when out of buffer they call write().
OTOH, raw_svector_ostream (without a buffer) goes though write for every
character or block it writes. It can work without virtual write() by
overriding the existing virtual write_impl() but this is a slower code path
for
2015 May 22
2
[LLVMdev] SmallString + raw_svector_ostream combination should be more efficient
Here's a performance testcase for the raw_svector_ostream patch. On my
WIndows x64 machine it runs in 1010ms with the current code and in 440ms
with the patch applies. Is this OK to commit?
2015-05-02 21:31 GMT+03:00 Yaron Keren <yaron.keren at gmail.com>:
> Following a hint from Duncan in http://llvm.org/pr23395, here is a
> revised patch. Rather then introduce the
2016 Sep 14
4
setDataLayout segfault
I get a segfault with this code when setting the data layout:
int main(int argc, char** argv)
{
llvm::InitializeNativeTarget();
llvm::LLVMContext TheContext;
unique_ptr<Module> Mod(new Module("A",TheContext));
llvm::EngineBuilder engineBuilder(std::move(Mod));
std::string mcjit_error;
engineBuilder.setMCPU(llvm::sys::getHostCPUName());
2015 May 02
2
[LLVMdev] SmallString + raw_svector_ostream combination should be more efficient
+update diff
2015-05-02 7:38 GMT+03:00 Yaron Keren <yaron.keren at gmail.com>:
> I outlined (is that the right
> word?) raw_char_ostream::grow, raw_char_ostream::write (both) into
> raw_ostream.cpp with less than 10% difference in performance.
>
> Profiling reveals that the real culprit is the code line
>
> OS.reserve(OS.size() + 64);
>
> called from
2011 Jun 24
0
[LLVMdev] Infinite loop in llc on ARMv7 (LLVM HEAD from June 17)
On Fri, Jun 24, 2011 at 9:12 AM, Karel Gardas <karel.gardas at centrum.cz> wrote:
> Hello,
>
> it looks like I do have infinite loop in llc on linux/armv7 platform
> somewhere in llvm::SmallVectorImpl. Two backtraces obtained with 10
> seconds delay are:
>
> 0x0099be14 in llvm::SmallVectorTemplateCommon<llvm::SDNode*>::setEnd
> (this=0x7ee90b38, P=0x5c06988)
2016 Sep 14
2
setDataLayout segfault
Ok. I can make a copy of the unique_ptr before moving it into the
builder's constructor and use the copy later on. It is confusing to
require a unique_ptr.
Frank
On 09/14/2016 12:11 PM, Frank Winter via llvm-dev wrote:
> I am constructing the engine builder in the following way:
>
> llvm::SMDiagnostic Err;
> unique_ptr<Module> Mod = getLazyIRFileModule("f.ll",
2016 Feb 01
2
Question about store with unaligned memory address
Hi Bruce,
Thanks for response.
I also think it is not good way. Do you have the other ways to legalize it?
Thanks,
JinGu Kang
2016-02-01 13:11 GMT+00:00 Bruce Hoult <bruce at hoult.org>:
> In fact this is a pretty bad legalizing/lowering because you only need to
> load and edit for the first and last values in the vector. The other words
> are completely replaced and don't
2018 May 03
3
length of `...`
Hi,
It would be great if one of the experts could comment on the
difference between Hadley's dotlength and ...length? The fact
that someone bothered to implement a new primitive for that
when there seems to be a very simple and straightforward R-only
solution suggests that there might be some gotchas/pitfalls with
the R-only solution.
Thanks,
H.
On 05/03/2018 08:34 AM, Hadley Wickham
2018 May 03
4
length of `...`
On 03/05/2018 11:01 AM, William Dunlap via R-devel wrote:
> In R-3.5.0 you can use ...length():
> > f <- function(..., n) ...length()
> > f(stop("one"), stop("two"), stop("three"), n=7)
> [1] 3
>
> Prior to that substitute() is the way to go
> > g <- function(..., n) length(substitute(...()))
> >
2017 Jul 21
4
[PATCH] common/mlstdutils: Implement StringSet.
---
builder/sources.ml | 2 --
common/mlstdutils/Makefile.am | 4 ++-
common/mlstdutils/stringSet.ml | 19 ++++++++++++
common/mlstdutils/stringSet.mli | 46 ++++++++++++++++++++++++++++
dib/elements.ml | 2 --
sysprep/sysprep_operation_ca_certificates.ml | 1 -
2007 Jun 05
2
.activate() behaviour
Hi all,
I''m trying to understand why the following code doesnt work...
----------------------------------------------------------------------------------------
<html>
<head>
<title>blabla</title>
<script type="text/javascript" src="prototype.js"></script>
</head>
<body>
<form action="bllalba">