Displaying 15 results from an estimated 15 matches for "constantuniquemap".
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 struc...
2011 Jun 24
0
[LLVMdev] inefficiencies in ConstantUniqueMap ?
On Jun 24, 2011, at 8:28 AM, Jay Foad wrote:
> 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;
>...
2011 Jun 30
0
[LLVMdev] inefficiencies in ConstantUniqueMap ?
On 30 June 2011 14:07, Duncan Sands <baldrick at free.fr> wrote:
> Hi Jay,
>
>> As I understand it, PATypeHolder, OpaqueType and the Module's
>> TypeSymbolTable are gone. Instead, StructTypes can optionally be
>> named, and if they are then:
>>
>> - they use name equivalence instead of structural equivalence.
>> - you can create them without any
2011 Jun 30
0
[LLVMdev] inefficiencies in ConstantUniqueMap ?
>>> [...] why not to a struct without a name?
>>
>> This would imply that you were starting with a struct with no name and
>> no fields, which is not something you can create in C:
>>
>> struct; // this isn't a C type!
>
> I see structs with fields but without names come flying out of gcc for C++
> code
> all the time.
That's fine; in C
2011 Jun 30
0
[LLVMdev] inefficiencies in ConstantUniqueMap ?
I'll have another go then!
> I find this distinction between structs with names and structs without
> names strange. Why is a name relevant to anything? If you can add fields
> to a struct with a name [...]
This corresponds to the following C constructs:
struct S; // create struct with name but no fields
...
struct S { int i, j; } // add fields to named struct
> [...] why not
2011 Jun 30
1
[LLVMdev] inefficiencies in ConstantUniqueMap ?
On Jun 30, 2011, at 5:38 AM, Jay Foad wrote:
> In case anyone's interested, here's my work-in-progress patch for
> clang. (Note that it's against a slightly old clang tree, because the
> llvm type-system-rewrite branch hasn't had a merge from trunk
> recently; and you also need the attached llvm patchlet to make it all
> build.)
> I'm not 100% satisfied with
2011 Jun 25
0
[LLVMdev] inefficiencies in ConstantUniqueMap ?
On 25 June 2011 13:00, Duncan Sands <baldrick at free.fr> wrote:
>> 3. Clang/dragonegg need to adapt to the new API (help appreciated!)
>
> what needs to be done exactly?
Background info: http://www.nondot.org/sabre/LLVMNotes/TypeSystemRewrite.txt
As I understand it, PATypeHolder, OpaqueType and the Module's
TypeSymbolTable are gone. Instead, StructTypes can optionally be
2011 Jun 30
2
[LLVMdev] inefficiencies in ConstantUniqueMap ?
Hi Jay,
> I'll have another go then!
thanks!
>> I find this distinction between structs with names and structs without
>> names strange. Why is a name relevant to anything? If you can add fields
>> to a struct with a name [...]
>
> This corresponds to the following C constructs:
>
> struct S; // create struct with name but no fields
> ...
> struct S
2011 Jun 25
3
[LLVMdev] inefficiencies in ConstantUniqueMap ?
Hi Chris,
> 3. Clang/dragonegg need to adapt to the new API (help appreciated!)
what needs to be done exactly?
Ciao, Duncan.
2011 Jun 30
0
[LLVMdev] inefficiencies in ConstantUniqueMap ?
On 27 June 2011 18:58, Chris Lattner <clattner at apple.com> wrote:
>
> On Jun 25, 2011, at 11:59 AM, Jay Foad wrote:
>
>> I've played with the Clang bits of this. The biggest problem I've
>> found is that Clang uses LLVM's type resolution not just for
>> forward-declared structs/classes/unions, which convert
>> straightforwardly to the new
2012 Feb 02
1
[LLVMdev] Efficient Constant Uniquing
Chris asked me to look into improving the current sad state of
ConstantUniqueMap, and by coincidence Meador Inge started working on the
same thing on his own initiative, so I'm writing down a concrete proposal
to make sure we're not working at cross purposes.
The ConstantUniqueMap template class is used to store unique instances of
ConstantStruct, ConstantVector, Const...
2011 Jun 30
5
[LLVMdev] inefficiencies in ConstantUniqueMap ?
Hi Jay,
> As I understand it, PATypeHolder, OpaqueType and the Module's
> TypeSymbolTable are gone. Instead, StructTypes can optionally be
> named, and if they are then:
>
> - they use name equivalence instead of structural equivalence.
> - you can create them without any fields, and then add the fields
> later when the struct is complete.
I find this distinction between
2011 Jun 27
2
[LLVMdev] inefficiencies in ConstantUniqueMap ?
On Jun 25, 2011, at 11:59 AM, Jay Foad wrote:
> On 25 June 2011 13:00, Duncan Sands <baldrick at free.fr> wrote:
>>> 3. Clang/dragonegg need to adapt to the new API (help appreciated!)
>>
>> what needs to be done exactly?
>
> Background info: http://www.nondot.org/sabre/LLVMNotes/TypeSystemRewrite.txt
>
> As I understand it, PATypeHolder, OpaqueType
2015 Jun 02
2
[LLVMdev] Linking modules across contexts crashes
> On 2015-Jun-02, at 12:37, Yuri <yuri at rawbw.com> wrote:
>
> On 06/01/2015 11:43, Duncan P. N. Exon Smith wrote:
>> You can round-trip to bitcode, reading the module into the
>> destination context. The following pseudo-code gives the idea:
>>
>> bool linkModuleFromDifferentContext(Module &D, const Module &S) {
>>
2010 Mar 23
2
[LLVMdev] How to avoid memory leaks
...==20504== 56 bytes in 1 blocks are possibly lost in loss record 135 of 205
==20504== at 0x4C2596C: operator new(unsigned long) (vg_replace_malloc.c:220)
==20504== by 0x90CFA2: llvm::User::operator new(unsigned long,
unsigned int) (in /home/gabi/vgen/Debug/vgen)
==20504== by 0x895619: llvm::ConstantUniqueMap<char, llvm::Type,
llvm::UndefValue, false>::Create(llvm::Type const*, char const&,
std::_Rb_tree_iterator<std::pair<std::pair<llvm::Type const*, char>
const, llvm::UndefValue*> >) (in /home/gabi/vgen/Debug/vgen)
==20504== by 0x8853A3: llvm::UndefValue::get(llvm::Type...