Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] Cloning Functions"
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
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
2008 Jul 09
0
[LLVMdev] Cloning Functions
On Jul 9, 2008, at 10:43 AM, David Greene wrote:
> 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
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
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
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
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,
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
2009 Nov 05
2
[LLVMdev] Debug Information for LLVM 2.6 and TOT
Devang Patel wrote:
> Hi John,
>
> On Wed, Nov 4, 2009 at 12:04 PM, John Criswell <criswell at uiuc.edu> wrote:
>
>> Dear All,
>>
>> 1) I recall reading somewhere that a few optimizations in LLVM 2.6 strip
>> away debug information when such information interferes with
>> optimization. Is this correct,
>>
>
> Yes.
>
>
2009 Aug 06
3
[LLVMdev] Call Graph Analysis and function cloning
I need to perform call graph analysis (after all modules are merged) to
find which function calls which, and depending on the attributes that
each function has and what functions call it, I may need to clone it and
modify some of calls to that function to call the cloned function.
Currently we are doing this in few acrobatic moves that span from an
llvm-ld pass (to do call graph analysis) all the
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,
2016 Feb 12
3
CloneFunction during LTO leads to seg fault?
In general I use DebugInfoFinder and clear out Metadata if GV in null or GV->isDeclaration().
If there is any interest, I can post that patch...
Sergei
---
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation
> -----Original Message-----
> From: Tobias Edler von Koch [mailto:tobias at codeaurora.org]
> Sent: Friday, February 12, 2016
2014 Oct 02
2
[LLVMdev] Use list preservation when using Instruction::clone
I'm trying to create a clone of a function using Function::Create()
and CloneFunctionInto. However, I'm running into an issue. I believe
that the instructions in the function clone still have Use edges to
values in the original function. This is a problem for my purposes.
For example, consider an original function F. I create a new function
G belonging to the same module and call
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
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
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
2006 May 16
1
[LLVMdev] CloneModule ValueMap
After cloning a Module with CloneModule, there doesn't seem to be any
easy way to convert a Value pointing into the old Module to a Value
pointing into the new one.
The CloneModule implementation already has to keep such a mapping
internally, so I've written a patch that exposes it as a second inout
parameter to CloneModule(), with the one param version being a simple
wrapper for backward
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….
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 Oct 14
1
[LLVMdev] CloneFunction
Hi,
I want to duplicate a function and transfer it from one module to another. I found "CloneFunction()" but it needs an "vMap". I found that "vMap" is used to map the original values to the new values. So, hypothetically, if the original function uses a global variable from the previous module and I want that use in the new function to be mapped to a global variable