similar to: [LLVMdev] Cloning a function

Displaying 20 results from an estimated 900 matches similar to: "[LLVMdev] Cloning a function"

2016 Feb 11
2
CloneFunction during LTO leads to seg fault?
y > On Feb 11, 2016, at 8:00 AM, Scott A. Carr <carr27 at purdue.edu> wrote: > > Hello again, > > I've narrowed down my issue to a small test case. The core of the issue is that CloneFunction (with ModuleLevelChanges=true) on a function that has had other functions inlined into it generates orphan debug info metadata nodes. Then when this module is emitted, DwarfDebug
2016 Feb 09
2
CloneFunction during LTO leads to seg fault?
Hi Medhi, Thanks for you reply. Here is the full output of -print-after-all [1] and just the module itself after my pass[2]. I've looked over the IR, but I can't see anything obviously wrong. I'm not sure what you meant by: > You may want to try to add it at the end of the pipeline My pass is the last one added inside populateLTOPassManager. Should I add it to the
2016 Mar 01
2
Insert CallInst within a function passing same parameters of the calling function.
Hi, supposing I have a function “foo” like the following: int foo(int a, int b) { ... ... } I want to insert int the LLVM IR a call instructions to a function “bar” that requires the same parameters of foo. So my function foo will become: int foo(int a, int b) { bar(a,b); … ... } I am using the following code: bool ThreadSanitizer::runOnFunction(Function &F) {
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,
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
2015 Feb 04
6
[LLVMdev] llvm builtins
In the following example with gcc style builtins, in once case llvm.powi.f64 is emitted and in the other just a call to library function powf. ~/llvm/build/Debug+Asserts/bin/clang -S -emit-llvm pow1.c Why is that? Is there a way to force the call to an llvm style builtin? Tia. Reed -------------- next part -------------- A non-text attachment was scrubbed... Name: pow1.c Type: text/x-csrc
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
2017 Jan 12
2
The most efficient way to implement an integer based power function pow in LLVM
> On Jan 12, 2017, at 12:58 PM, Friedman, Eli via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > On 1/12/2017 9:33 AM, Mehdi Amini via llvm-dev wrote: >>> On Jan 12, 2017, at 5:03 AM, Antoine Pitrou via llvm-dev <llvm-dev at lists.llvm.org> wrote: >>> >>> On Mon, 9 Jan 2017 11:43:17 -0600 >>> Wei Ding via llvm-dev <llvm-dev at
2017 Jan 12
2
The most efficient way to implement an integer based power function pow in LLVM
> On Jan 12, 2017, at 2:21 PM, Mehdi Amini <mehdi.amini at apple.com> wrote: > > >> On Jan 12, 2017, at 11:04 AM, Steve (Numerics) Canon <scanon at apple.com <mailto:scanon at apple.com>> wrote: >> >>> >>> On Jan 12, 2017, at 12:58 PM, Friedman, Eli via llvm-dev <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>>
2014 Dec 18
1
[LLVMdev] Metadata/Value split has landed
> On 2014-Dec-18, at 01:43, Keno Fischer <kfischer at college.harvard.edu> wrote: > > Hi Duncan, > > I'm in the following situation for which this change caused an assertion failure: > > Three modules, let's say A B C > Two function, F in A, G in B > > Now I CloneFunction F into B (call the new function F') and inline F' into G. > Now,
2013 Aug 13
2
[LLVMdev] SimplifyLibCalls doesn't check TLI for LibFunc availability
Hi, It looks like SimplifyLibCalls has a tendency to emit calls to libm functions without checking with TLI whether these calls are available. For example, PowOpt has this code: struct PowOpt : public UnsafeFPLibCallOptimization { PowOpt(bool UnsafeFPShrink) : UnsafeFPLibCallOptimization(UnsafeFPShrink) {} virtual Value *callOptimizer(Function *Callee, CallInst *CI, IRBuilder<> &B)
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
2016 Feb 09
2
CloneFunction during LTO leads to seg fault?
Hello, I'm writing an LTO pass and I'd like to be able to duplicate a function (with debugging info). I'm trying to accomplish this with CloneFunction but it's leading to a seg fault in ld. I've whittled down my problem so that it occurs in this small pass [1]. If I run this pass with opt, I get the expected result (i.e. a valid program that calls main twice). If I run
2020 Oct 28
4
Targeting old glibc
Hi, I wonder what is the right way to target an old glibc? I have a machine which is up to date (glibc 2.32 and clang+lld 10.0.1). So far I've been able to target older glibc by having a C file containing: __asm__(".symver powf,powf at GLIBC_2.2.5"); __asm__(".symver expf,expf at GLIBC_2.2.5"); __asm__(".symver exp2f,exp2f at GLIBC_2.2.5");
2007 Nov 11
2
[LLVMdev] MSVC 8 Build
Hi all, I have been experimenting with getting LLVM to build with MSVC8 express. I have succeeded in getting trunk to build and run the Fibonacci example in release mode. I have found various minor problems with the build system. First, it appears not to be able to run the configure subproject commands if there is a space in the directory path. Secondly, it fails to build different subprojects
2013 Aug 13
0
[LLVMdev] SimplifyLibCalls doesn't check TLI for LibFunc availability
On Tue, Aug 13, 2013 at 5:58 AM, Kuperstein, Michael M < michael.m.kuperstein at intel.com> wrote: > Hi,**** > > ** ** > > It looks like SimplifyLibCalls has a tendency to emit calls to libm > functions without checking with TLI whether these calls are available.**** > > For example, PowOpt has this code:**** > > ** ** > > struct PowOpt : public
2020 Nov 11
2
Targeting old glibc
On Tue, Nov 10, 2020 at 7:01 PM Fāng-ruì Sòng <maskray at google.com> wrote: > > How to find what is pulling libmvec? > > If you build a -DCMAKE_BUILD_TYPE=Debug lld, you can set a breakpoint > on lld/ELF/MarkLive.cpp:114 (ss->getFile().isNeeded) and check which > symbol makes > libmvec.so needed. I'm afraid this is going to far for me :) > > On the other
2010 Apr 15
0
[LLVMdev] Question About Cloning Machine Basic Block
On Wed, 2010-04-14 at 17:30 -0700, Hisham Chowdhury wrote: > > > > - Is there a utility to clone a MachineBasicBlock in LLVM > > > > > > There is CloneBasicBlock routine in ./lib/Transforms/Utils/CloneFunction.cpp - Sanjiv > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu