similar to: [LLVMdev] RFA: Constant String c"\000"

Displaying 20 results from an estimated 800 matches similar to: "[LLVMdev] RFA: Constant String c"\000""

2012 Jan 21
4
[LLVMdev] How to force the creation of arrays with zeroes?
Hi Chris. There is no zero arrays created. Probably this patch is not optimal and I'll reworked it today. But the main idea is keep a single zero-item when ConstantAggregateZero was wrapped and return this zero item as result of getOperand call. Note that wrapper has no parent classes, it has very local and short lifetime (method body), it exists outside the LLVMContext and needed for
2012 Jan 21
0
[LLVMdev] Fwd: How to force the creation of arrays with zeroes?
Hi Anton, in a solution without CAZ, isNullValue can just return true when it sees the special "this ConstantArray is all zero" flag. So all the places that now look for CAZ can just use isNullValue instead and there need be no performance loss. That said, CAZ is more "in your force" so less likely to be forgotten about. Another interesting possibility is to handle more than
2012 Jan 21
0
[LLVMdev] How to force the creation of arrays with zeroes?
How many times will a typical client call getOperand on your helper when it wraps a 10,000 element ConstantAggregateZero? With CAZ the client is force to think about this case, and often handles it much much more efficiently. CAZ is a time optimization as well as a space optimization. -Chris On Jan 21, 2012, at 12:03 AM, Stepan Dyatkovskiy <STPWORLD at narod.ru> wrote: > Hi Chris.
2012 Jan 22
2
[LLVMdev] Fwd: How to force the creation of arrays with zeroes?
Yep check out PR1324. Doing something like this would be a great improvement. -Chris On Jan 21, 2012, at 9:42 AM, Duncan Sands <baldrick at free.fr> wrote: > Hi Anton, in a solution without CAZ, isNullValue can just return true when it > sees the special "this ConstantArray is all zero" flag. So all the places that > now look for CAZ can just use isNullValue instead
2012 Jan 22
0
[LLVMdev] Fwd: How to force the creation of arrays with zeroes?
Hi Chris. The main question is how to implement ConstantAggregateXXXXX::getOperand? Should it be empty collection, or it must return the item aggregated? -Stepan. 22.01.2012, 04:43, "Chris Lattner" <clattner at apple.com>: > Yep check out PR1324.  Doing something like this would be a great improvement. > > -Chris > > On Jan 21, 2012, at 9:42 AM, Duncan Sands
2012 Jan 20
2
[LLVMdev] How to force the creation of arrays with zeroes?
Hi all. I propose to use wrapper for this kind of constant objects. Consider next code: Constant* C = reinterpret_cast<Constant*>(I->getOperand(idx)); Constant* ArrayItem; if (!isa<ConstantAggregateZero>(C)) ArrayItem = reinterpret_cast<Constant*>(I->getOperand(ArrItemIdx)); else ArrayItem = ZeroInt; Code analog within wrapper: ConstOrZero
2011 Jun 24
2
[LLVMdev] inefficiencies in ConstantUniqueMap ?
Hi, Consider ConstantUniqueMap::getOrCreate() (in lib/VMCore/ConstantsContext.h): /// getOrCreate - Return the specified constant from the map, creating it if /// necessary. ConstantClass *getOrCreate(const TypeClass *Ty, ValRefType V) { MapKey Lookup(Ty, V); ConstantClass* Result = 0; ... For array (or struct or vector) constants, typically: ValType = vector<Constant*>
2012 Jan 20
0
[LLVMdev] How to force the creation of arrays with zeroes?
Hi Anton, >> you can't, you can only get a ConstantAggregateZero. This is actually kind of >> annoying, and means that places expecting a ConstantArray have to remember to >> also check for ConstantAggregateZero. Perhaps there's a good reason for the >> current design, but if not it would be great to eliminate this wart. > Well, I think the main reason it so
2012 Jan 20
2
[LLVMdev] How to force the creation of arrays with zeroes?
> you can't, you can only get a ConstantAggregateZero.  This is actually kind of > annoying, and means that places expecting a ConstantArray have to remember to > also check for ConstantAggregateZero.  Perhaps there's a good reason for the > current design, but if not it would be great to eliminate this wart. Well, I think the main reason it so reduce the size of .ll / .bc when
2012 Jan 21
0
[LLVMdev] How to force the creation of arrays with zeroes?
I'd really rather not do this. Faking that large zero filled array is represented with ConstantArray means that the compiler will inevitably end up calling getOperand on each of those elements, burning a ton of compile time. -Chris On Jan 20, 2012, at 12:16 PM, Stepan Dyatkovskiy <STPWORLD at narod.ru> wrote: > Hi all. I propose to use wrapper for this kind of constant objects.
2012 Jan 21
2
[LLVMdev] Fwd: How to force the creation of arrays with zeroes?
Sorry, forgot to reply-all ---------- Forwarded message ---------- From: Anton Korobeynikov <anton at korobeynikov.info> Date: Sat, Jan 21, 2012 at 20:59 Subject: Re: [LLVMdev] How to force the creation of arrays with zeroes? To: Stepan Dyatkovskiy <STPWORLD at narod.ru> > Though, there is also cases when we really need to transform it to 10,000 zeroes (just look at CBackend.cpp,
2012 Jan 20
0
[LLVMdev] How to force the creation of arrays with zeroes?
Hi Stepan, > Hi all. How to force the creation of arrays with zeroes? Or this use-case is not provided? you can't, you can only get a ConstantAggregateZero. This is actually kind of annoying, and means that places expecting a ConstantArray have to remember to also check for ConstantAggregateZero. Perhaps there's a good reason for the current design, but if not it would be great to
2007 Aug 20
1
[LLVMdev] Problem with missing support for non-zero contant initializers.
Chris Lattner wrote: >> D allows static arrays up to 16MB in size. I'm initializing global >> static arrays with a constant initializer. But D requires that (per >> default) static arrays are initialized with the default initializer >> for the element type. For float this happens to be NaN, so I cannot >> use a 'zeroinitializer'. > > Wow, this *is*
2012 Jan 22
1
[LLVMdev] Fwd: How to force the creation of arrays with zeroes?
Hi Stephan, I've been thinking about this a bit and have some more specific ideas, I'll write up a design and maybe implement it over the next few days. -Chris On Jan 21, 2012, at 11:50 PM, Stepan Dyatkovskiy <STPWORLD at narod.ru> wrote: > Hi Chris. The main question is how to implement ConstantAggregateXXXXX::getOperand? Should it be empty collection, or it must return the
2006 May 09
1
[LLVMdev] Memory leaks in LLVM
Hi, Probably some of the leaks Valgrind reports are spurious, but the numbers seem to be significant enough to demand some attention: ==10132== LEAK SUMMARY: ==10132== definitely lost: 15,624 bytes in 558 blocks. ==10132== indirectly lost: 44,548 bytes in 1,591 blocks. ==10132== possibly lost: 37,576 bytes in 98 blocks. ==10132== still reachable: 1,336,876 bytes in 1,364 blocks.
2012 Sep 04
2
[LLVMdev] [NVPTX] Backend cannot handle array-of-arrays constant
I think our test case demonstrates that requiring the array item being initialized to be constant is incorrect. NVPTX does not crash anymore and produces correct result with the following change: --- NVPTXAsmPrinter.cpp 2012-09-03 15:14:00.000000000 +0200 +++ NVPTXAsmPrinter.cpp 2012-09-04 15:47:17.859398193 +0200 @@ -1890,17 +1890,15 @@ case Type::ArrayTyID: case Type::VectorTyID: case
2013 Oct 16
0
[LLVMdev] [Debug Info PATCH] for support of ref_addr and removal of DIE duplication
On Tue, Oct 15, 2013 at 5:59 PM, David Blaikie <dblaikie at gmail.com> wrote: > > In beginModule, we construct the CUs, but not all the DIEs that belong >>>> to the CU. >>>> In endFunction, we started to construct the scope DIEs. So in some >>>> sense, we are adding things to prior CUs. >>>> >>>> Looking at void
2012 Sep 06
0
[LLVMdev] [NVPTX] Backend cannot handle array-of-arrays constant
On 09/04/2012 09:57 AM, Dmitry N. Mikushin wrote: > I think our test case demonstrates that requiring the array item being > initialized to be constant is incorrect. NVPTX does not crash anymore > and produces correct result with the following change: > > --- NVPTXAsmPrinter.cpp 2012-09-03 15:14:00.000000000 +0200 > +++ NVPTXAsmPrinter.cpp 2012-09-04 15:47:17.859398193 +0200 >
2020 Apr 30
2
Discrepancy between Debug and Release+Asserts versions of Clang/LLVM
Hello, I am editing the LowerTypeTests pass in LLVM, and part of my additions include the following 3 lines of code: // newTypeName is a std::string MDString* newMD = MDString::get(M.getContext(), newTypeName); ArrayRef<Metadata*> mdArray {ConstantInt::get(Int64Ty, 0), newMD}; auto* node = MDTuple::get(M.getContext(), mdArray); Thus far, I have been developing on a version of Clang with
2013 Oct 16
0
[LLVMdev] [Debug Info PATCH] for support of ref_addr and removal of DIE duplication
On Wed, Oct 16, 2013 at 11:10 AM, David Blaikie <dblaikie at gmail.com> wrote: > > > > On Wed, Oct 16, 2013 at 10:54 AM, Manman Ren <manman.ren at gmail.com> wrote: > >> >> >> >> On Tue, Oct 15, 2013 at 5:59 PM, David Blaikie <dblaikie at gmail.com>wrote: >> >>> >>> In beginModule, we construct the CUs, but not all