Displaying 20 results from an estimated 4000 matches similar to: "[LLVMdev] Linking Modules"
2012 Feb 05
0
[LLVMdev] Linking Modules
On Feb 3, 2012, at 10:05 AM, David Greene wrote:
> I've hacked around this problem in the past but I would like to
> do things the "right" way.
>
> Suppose I have this scenario:
>
> - A data structure that maps LLVM Values off to the side.
> - We link two Modules together
>
> The data structure is a map from one IR to another, so when we see
>
2015 Oct 12
3
[RFC] Clean up the way we store optional Function data
> On 2015-Oct-12, at 10:41, Sanjoy Das <sanjoy at playingwithpointers.com> wrote:
>
>
>
> Vedant Kumar wrote:
>>>> That's a neat idea. To summarize: make Function have 3 optional operands. (For context -- Function currently has 1 optional operand, and my proposal is to move to 0.)
>>>>
>>>> Could someone else chime in on what
2015 Oct 12
2
[RFC] Clean up the way we store optional Function data
>> That's a neat idea. To summarize: make Function have 3 optional operands. (For context -- Function currently has 1 optional operand, and my proposal is to move to 0.)
>>
>> Could someone else chime in on what they'd like to see?
>
> Sanjoy's idea makes sense to me, but only if we never need to add
> prefix/prologue data after functions are created. Are
2015 Oct 12
2
[RFC] Clean up the way we store optional Function data
David Majnemer wrote:
>
>
> On Mon, Oct 12, 2015 at 11:00 AM, Duncan P. N. Exon Smith via llvm-dev
> <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote:
>
>
> > On 2015-Oct-12, at 10:41, Sanjoy Das
> <sanjoy at playingwithpointers.com
> <mailto:sanjoy at playingwithpointers.com>> wrote:
> >
>
2015 Oct 16
2
[RFC] Clean up the way we store optional Function data
Here is a WIP patch as promised:
http://reviews.llvm.org/D13829
It uses a hungoff uselist to store optional data as needed.
Some early objections from Duncan:
- An extra one-time malloc() is required to set personality functions.
- We get and set personality functions frequently. This patch introduces a level of indirection which slows the common case down.
Is this overhead
2015 Oct 21
2
[RFC] Clean up the way we store optional Function data
I've done some measurements on this.
The test program I have just calls Function::Create(), F->setPersonalityFn(), and then F->eraseFromParent() in a loop 2^20 times.
Results:
pre-patch --- min: 1.10s max: 1.13s avg: 1.11s
post-patch --- min: 1.26s max: 1.35s avg: 1.29s
So we expect to lose 0.2 seconds per 1 million functions (with personality functions) in a
2013 Apr 02
1
[LLVMdev] cyclical dependence between caller and callee in JIT
2013/3/27 Nick Lewycky <nicholas at mxc.ca>:
>The common idiom to delete any Value* is:
>
> V->replaceAllUsesWith(UndefValue::get(V->getType());
> V->eraseFromParent();
>
> Does that work for functions? You may need to make sure the 'undef' has a
> pointer to function type instead of the function type.
>
I tried this code sample, passing the type
2015 Oct 12
2
[RFC] Clean up the way we store optional Function data
Hi Sanjoy,
> I don't know how prologue and prefix data is used -- is it correct to
> say that you're basically trying to give `llvm::Function` s some
> "optional" operands, and that you know during construction of an
> `llvm::Function` how many optional operands the `llvm::Function` will
> need[1]?
Yep. Though not operands exactly, since they wouldn't be in
2014 Dec 10
2
[LLVMdev] Metadata/Value split has landed
> On 2014 Dec 10, at 08:40, Tom Stellard <tom at stellard.net> wrote:
>
> On Tue, Dec 09, 2014 at 09:22:16PM -0800, Duncan P. N. Exon Smith wrote:
>> The `Metadata`/`Value` split (PR21532) landed in r223802 -- at least, the
>> C++ side of it. This was a rocky day, but I suppose that's what I get
>> for failing to stage the change in smaller pieces.
>>
2014 Dec 10
3
[LLVMdev] Metadata/Value split has landed
> On 2014 Dec 10, at 14:08, Tom Stellard <tom at stellard.net> wrote:
>
> On Wed, Dec 10, 2014 at 11:21:08AM -0800, Duncan P. N. Exon Smith wrote:
>>
>>> On 2014 Dec 10, at 08:40, Tom Stellard <tom at stellard.net> wrote:
>>>
>>> On Tue, Dec 09, 2014 at 09:22:16PM -0800, Duncan P. N. Exon Smith wrote:
>>>> The `Metadata`/`Value`
2014 Nov 10
12
[LLVMdev] [RFC] Separating Metadata from the Value hierarchy
TL;DR: If you use metadata (especially if it's out-of-tree), check the
numbered list of lost functionality below to see whether I'm trying to
break your compiler permanently.
In response to my recent commits (e.g., [1]) that changed API from
`MDNode` to `Value`, Eric had a really interesting idea [2] -- split
metadata entirely from the `Value` hierarchy, and drop general support
for
2014 Dec 11
2
[LLVMdev] Metadata/Value split has landed
On Wed, Dec 10, 2014 at 05:27:45PM -0800, Duncan P. N. Exon Smith wrote:
> +zalman at google.com
>
Hi Duncan,
This patch plus another small change fixes the assertion failure for
me. With the patch alone, the void* overload of addGarbageObject()
was being used by MDNode::getTemporary(), so I had to cast the object as
an MDNode*:
diff --git a/lib/IR/Metadata.cpp b/lib/IR/Metadata.cpp
2014 Dec 11
2
[LLVMdev] Metadata/Value split has landed
I committed:
r224058 = 966942da9e68b59c31ce770e7f94c55a63482c6b
r224060 = da75f7277e3a129aed8ef8aa4e0d84de40b76fd4
r224061 = f88e4c8e9171045454b2c8e05054c2af8da3fe4f
Let me know if somehow you're still hitting the problem.
r224061 removes leak detection entirely from `MachineInstr`. There aren't
any leaks to be had there, since they're allocated in a custom allocator.
They're
2014 Nov 10
5
[LLVMdev] [RFC] Separating Metadata from the Value hierarchy
> On 2014-Nov-10, at 08:30, Chris Lattner <clattner at apple.com> wrote:
>
>> On Nov 9, 2014, at 5:02 PM, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote:
>> In response to my recent commits (e.g., [1]) that changed API from
>> `MDNode` to `Value`, Eric had a really interesting idea [2] -- split
>> metadata entirely from the `Value` hierarchy, and
2009 Oct 05
2
[LLVMdev] Linker Question
Say I have the following code:
main.c:
void foo(char *, ...);
void bar(int, ...);
int main(void)
{
foo("foo", 1);
bar(1, 2, 3, "bar");
return 0;
}
foobar.c:
int printf(const char *, ...);
void foo(const char *str, int i)
{
printf("%s: %d\n", str, i);
}
void bar(int i, int j, int k, const char *str)
{
printf("%s
2014 Dec 10
4
[LLVMdev] Metadata/Value split has landed
The `Metadata`/`Value` split (PR21532) landed in r223802 -- at least, the
C++ side of it. This was a rocky day, but I suppose that's what I get
for failing to stage the change in smaller pieces.
As of r223916 (lldb), I'm not aware of any remaining (in-tree) breakage,
so if I've missed some problem in the sea of buildbot errors, please
flag me down.
I'll follow up soon with
2015 Jun 01
2
[LLVMdev] Linking modules across contexts crashes
> On 2015-Jun-01, at 11:06, Reid Kleckner <rnk at google.com> wrote:
>
> I'm pretty sure module linking is expected to occur in the same LLVM context.
Correct.
> IIRC Duncan had some proposal for how ld64 could do something clever with multiple contexts, but I've totally forgotten what it was.
This was for LTO (probably unrelated to Yuri's scenario?).
1.
2015 May 30
2
[LLVMdev] Linking modules across contexts crashes
I get a crash when I try to link multiple modules registered in their
individual contexts.
Documentation for Linker::LinkModules doesn't mention anything about
contexts, and the first link succeeds. But the second link crashes.
Is this not the right way to merge such modules? If not, then what is
the right way?
In any case, documentation for Linker::LinkModules should say if
contexts are
2010 Sep 22
2
[LLVMdev] Hit assert(I != ValueMap.end() && "Value not in slotcalculator!") in ValueEnumerator.cpp
Hi there,
I added a function to a module, but failed to write the bitcode to file
because it hit the:
assert(I != ValueMap.end() && "Value not in slotcalculator!")
So I added some diagnosis information there,
unsigned ValueEnumerator::getValueID(const Value *V) const {
if (isa<MDNode>(V) || isa<MDString>(V)) {
ValueMapType::const_iterator I =
2008 Apr 16
0
[LLVMdev] Problems in removing a cloned instruction.
Hi,
I'm gonna try to give some feedback, but I have only been working with LLVM
for a few days, so don't take what I'm saying without verifying :-)
> BasicBlock *ProgSlicer::CloneBasicBlock(const BasicBlock *BB,
> DenseMap<const Value*, Value*> &ValueMap,
> const char *NameSuffix, Function *F) {
>
> BasicBlock