similar to: [LLVMdev] CloneModule ValueMap

Displaying 20 results from an estimated 4000 matches similar to: "[LLVMdev] CloneModule ValueMap"

2008 Jul 11
0
[LLVMdev] Cloning Functions
On Wednesday 09 July 2008 13:49, David Greene wrote: > > then it seems you're doing > > > > for each function > > generate_ir > > convert_to_llvm_ir > > optimize_llvm_ir > > Yep. Ok, I've mostly got a mechanism to do what I want: 1. As each function comes in for op/codegen, clone it and save off the clone and its associated ValueMap (I
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 Jul 11
2
[LLVMdev] Cloning Functions
On Jul 11, 2008, at 9:59 AM, David Greene wrote: > On Wednesday 09 July 2008 13:49, David Greene wrote: > >>> then it seems you're doing >>> >>> for each function >>> generate_ir >>> convert_to_llvm_ir >>> optimize_llvm_ir >> >> Yep. > > Ok, I've mostly got a mechanism to do what I want: > > 1. As
2016 Jan 26
2
Handling of metadata in llvm::CloneModule
Sorry if this has been discussed already... I am trying to understand whether there is an underlying reason why llvm::CloneModule takes argument function ShouldCloneDefinition to discriminate on objects being cloned, but blindly copies all named metadata...? In my case this results in debug nodes that are creating uses/relocations for global objects that were _not_ copied per
2011 Aug 13
1
[LLVMdev] patch: CloneModule resets GlobalVariable address space
Hi, I found the following bug in llvm::CloneModule (svn, head revision). When copying over global variables the address space is reset to default. The patch changes that behavior by using the other GlobalVariable constructor that explicitely includes that information. Regards, Simon -------------- next part -------------- A non-text attachment was scrubbed... Name:
2019 Sep 26
2
DenseMap/ValueMap: is M[New]=M[Old] valid ?
Hi, I have a question about llvm/ADT/DenseMap.h and llvm/IR/ValueMap.h: When you have a: MapType M; is it safe to do: M[NewKey] = M[OldKey]; or do you need to do it in two steps: auto tmp = M[OldKey]; // ensure the reference to M[OldKey] is copied, before reassigning. M[NewKey] = tmp; // might reallocate aka, will a possible allocation for M[NewKey] invalidate the
2008 Jul 09
2
[LLVMdev] Cloning Functions
On Wednesday 09 July 2008 12:16, Eli Friedman wrote: > On Wed, Jul 9, 2008 at 9:56 AM, David Greene <dag at cray.com> wrote: > > I seem to recall havbing asked this before but I can't find it by > > searching. > > > > What's the right way to clone a Function? I need to save off the text at > > a certain point and spit it out later, after other
2010 Sep 22
0
[LLVMdev] Hit assert(I != ValueMap.end() && "Value not in slotcalculator!") in ValueEnumerator.cpp
Hi Guoliang, > 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!") does the module pass the verifier after you add the function to it? Ciao, Duncan.
2008 Jul 09
2
[LLVMdev] Cloning Functions
On Wednesday 09 July 2008 13:24, Devang Patel wrote: > Is it possible to explain intended use of original unoptimized version ? bugpoint. I want to run it on the IR produced by our frontend. This will help us generate new LLVM tests we can send upstream. We've fixed bugs that aren't caught by the upstream tests and it would be nice to capture the problem and make the test
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
2019 Sep 27
2
DenseMap/ValueMap: is M[New]=M[Old] valid ?
I actually ran into an elusive bug with this exact same issue some time ago as well, see https://bugs.llvm.org/show_bug.cgi?id=42065 and https://reviews.llvm.org/D62624. The strange thing about that bug was that it only showed up if built with GCC; Clang dereferenced the right hand side reference before evaluating the left hand side, as long as the value type was as small as the reference
2011 Jul 12
1
What's wrong with my code? (Edited version-added my data)
I've written out codes for one particular file, and now I want to generate the same kind of graphs and files for the rest of similar data files. For example, a file "8.csv" would look like such: enc_callee inout o_duration type A out 342 de B in 234 de C out 132 de E in 111 de A in 13 cf H in 15.7 cf G out 32 de A out 32 cf I in 14 de K in 189 de J out 34.1 cf B in 98.7 de H out
2001 Jun 02
2
inout() in splancs working properly?
I have a problem with function 'inout()' in package 'splancs' on CRAN-R Version 1.2.3 under FreeBSD4.3-STABLE. The following script produces and draws points and a polygon-surrounded area. Repeating the same script many times shows, that points on the polygon-line often, but not always, are outside of the polygon-area. library(splancs) # dataset with polygon (convex
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
2018 Mar 27
2
IRMover asserts "mapping to a source type" when repeatedly linking - usage or LLVM bug?
Hi, On 2018-03-26 16:44:05 -0700, Duncan P. N. Exon Smith wrote: > > The second approach is to *not* cache modules but re-read them from disk > > (or memory, but that's irrelevant here). That works without any sort of > > asserts, but "leaks" memory because everytime a module is re-read from > > disk it re-creates types (cf
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. >>
2008 Apr 16
2
[LLVMdev] Problems in removing a cloned instruction.
Hi all, I am trying to write a pass where i am creating a clone of a function (the only difference being, the new function returns void , instead of any value). I am creating a new Function Type with a void return type (rest being the same as original function), and using this i am creating a new function body. Then, i clone the body of the old function into new function, but when ever i
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 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