similar to: [LLVMdev] Use list preservation when using Instruction::clone

Displaying 20 results from an estimated 4000 matches similar to: "[LLVMdev] Use list preservation when using Instruction::clone"

2016 Jul 15
2
clone function
On 14 July 2016 at 20:07, Mehdi Amini <mehdi.amini at apple.com> wrote: > > On Jul 14, 2016, at 7:58 AM, Pierre Gagelin via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > > Hi, > > I am trying to use the CloneFunction from llvm/Transforms/Utils/Cloning.h > and I don't understand how the ValueToValueMapTy argument should be > initialized. For instance,
2016 Jul 14
2
clone function
Hi, I am trying to use the CloneFunction from llvm/Transforms/Utils/Cloning.h and I don't understand how the ValueToValueMapTy argument should be initialized. For instance, let say I want to clone this function (to add an argument): define void @function(i32 %i) #0 { entry: %i.addr = alloca i32, align 4 store i32 %i, i32* %i.addr, align 4 ret void } to another function which should,
2017 Jun 20
2
CloneFunctionInto produces invalid debug info
I was just going to say: With well-formed debug info it should create a deep copy up until the DISubprogram, but no further. But because the DISubprogram linked to the Function is missing the special handling of the DISubprogram (that would prohibit cloning the DICompileUnit is side-stepped). But then I remembered the discussion we had in
2013 May 29
2
[LLVMdev] CloneFunctionInto() Error
Dear All, I need your help urgently I have to copy the CFG of each function using CloneFunction or CloneFunctionInto. After I made the copy function. Print the basic blocks then get this error : While deleting: i32 % Use still stuck around after Def is destroyed: %mul2_ = mul nsw i32 %6, 3 Use still stuck around after Def is destroyed: store i32 3, i32* %x_, align 4 opt: Value.cpp:75: virtual
2013 May 29
0
[LLVMdev] CloneFunctionInto() Error
Does cloning copies the function with its address or it constructs a new address to the new function? Is this real copying for the CFG or just opaque one to do some work? If it's not real copying, please I need a method that can help me in copying the function in another with new pointer to another address. Please I need answer urgent Thanks On 29 May 2013 10:14, Rasha Omar <rasha.sala7
2017 Jun 19
2
CloneFunctionInto produces invalid debug info
- old Keno +current Keno > On Jun 19, 2017, at 2:59 PM, Adrian Prantl <aprantl at apple.com> wrote: > > In your example the instructions in the cloned function have debug locations belonging to a different function, and the function itself is missing a DISubprogram metadata attachment. > >> (lldb) p OldFunc->dump() >> >> ; Function Attrs: nounwind optsize
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
2017 Jun 16
2
CloneFunctionInto produces invalid debug info
The if you are cloning into the same LLVM module the CU should not cloned. If don't mind sharing your code, I can try to help diagnose why the CU gets cloned... just send me a patch that applies to trunk and instructions. -- adrian > On Jun 16, 2017, at 1:54 PM, Sergei Larin <slarin at codeaurora.org> wrote: > > Sorry… It takes a pass that was not accepted for upstreaming….
2017 May 03
3
Should it be legal for two functions to have the same !dbg attachment?
I just wrote an IR Verifier check that catches the following situation: ; RUN: not llvm-as %s -disable-output 2>&1 | FileCheck %s define void @f1() !dbg !4 { unreachable } ; CHECK: DISubprogram attached to more than one function define void @f2() !dbg !4 { unreachable } !llvm.dbg.cu = !{!1} !1 = distinct !DICompileUnit(language: DW_LANG_C99, file: !2) !2
2012 Dec 01
0
[LLVMdev] [RFC] "noclone" function attribute
On 12/1/2012 10:02 AM, James Molloy wrote: > > This means that cloning whole functions (CloneFunction and CloneFunctionInto) will still work [...]. Unfortunately, it won't work. Assume all threads call foo: foo() { ... bar(i) ... } bar(int i) { ... barrier(); ... } Now, suppose that we have discovered that bar(0) can be greatly optimized and generate a call to
2008 Jul 09
2
[LLVMdev] Cloning Functions
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 optimizations have run. But I need to spit out the original text, not the optimized version. What would be the most effective way to do this?
2008 Jul 09
0
[LLVMdev] Cloning Functions
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 optimizations have run. But > I need to spit out the original text, not the optimized
2017 Jun 15
3
CloneFunctionInto produces invalid debug info
Can you send me a patch with instructions to reproduce? I can take a look. -- adrian > On Jun 15, 2017, at 2:23 PM, Sergei Larin <slarin at codeaurora.org> wrote: > > Yes, it does for us. My tree is couple days off the tip, and I see it there. > > Sergei > > From: llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org] On Behalf Of Keno Fischer via llvm-dev > Sent:
2015 Apr 24
4
[LLVMdev] Floating point atomic load and add
Hello, I'm wondering how I can create an atomic load and add instruction for floating point values. If I use IRBuilder::CreateAtomicRMW() I get the error message: "atomicrmw operand must have integer type". I am using LLVM 3.4 and the only system I need to support is x86.
2012 Dec 01
6
[LLVMdev] [RFC] "noclone" function attribute
Hi, OpenCL has a "barrier" function with very specific semantics, and there is currently no analogue to model this in LLVM. This has been touched on by the SPIR folks but I don't believe they put forward a proposal. The barrier function is a special function that ensures that all workitems executing a kernel have executed up to that point before execution on any workitem can
2011 Feb 22
0
[LLVMdev] Clone a function and change signature
On 2/22/11 1:31 PM, Arushi Aggarwal wrote: > Hi, > > I want to clone a given function, and add an argument to it. I then > want to add a call to that new function. I have a callInstruction CI, > which I want to transform to call this new function, and to take a new > argument. If I understand correctly, you're cloning the function first and then adding a new argument to
2011 Feb 22
2
[LLVMdev] Clone a function and change signature
Hi, I want to clone a given function, and add an argument to it. I then want to add a call to that new function. I have a callInstruction CI, which I want to transform to call this new function, and to take a new argument. The code I added was as follows CI->getCalledFunction()->dump(); Function* DirectF = CloneFunction(CI->getCalledFunction());
2020 Jun 15
2
Need help in creating clone functions
Hello, I am working on creating a llvm pass which clones a certain function with a different name using CloneFunctionInto. I create a call instruction to call a new cloned function from the old function. In llvm IR and in .s file everything looks as expected, but when I call this program with gdb and set a breakpoint on this new function, gdb shows the name of the original function. I know it has
2015 Jul 11
7
[LLVMdev] instructions copy
Hi, I want to copy some dependent statements, like a = b, b = c, from one basicblock to another basicblocks. Because of SSA, a = b, will be like %1 = load %b, store %1, %a. If I just use clone() method in Instruction class, it will be like <badref> = load %b, store <badref>, %a. If I need remap the virtual registers, this map just will affect the whole module? And how to use it? I am
2014 Oct 19
2
[LLVMdev] SSA for memory objects
Hello, I'm looking to learn more about what is available for memory versioning or inducing some kind of SSA for memory objects. I found this page: http://llvm.org/docs/tutorial/OCamlLangImpl7.html#memory-in-llvm Which says: "[LLVM] does not require (or permit) memory objects to be in SSA form.... In LLVM, instead of encoding dataflow analysis of memory into the LLVM IR, it