similar to: [LLVMdev] Query on optimizing away function calls.

Displaying 20 results from an estimated 20000 matches similar to: "[LLVMdev] Query on optimizing away function calls."

2009 Jun 18
1
[LLVMdev] Query on optimizing away function calls.
Hi Duncan, > Message: 15 > Date: Thu, 18 Jun 2009 10:58:47 +0200 > From: Duncan Sands <baldrick at free.fr> > Subject: Re: [LLVMdev] Query on optimizing away function calls. > To: LLVM Developers Mailing List <llvmdev at cs.uiuc.edu> > Message-ID: <4A3A01C7.8020707 at free.fr> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > Hi, >
2009 Jun 18
0
[LLVMdev] Query on optimizing away function calls.
Hi, > Consider the following code: > > ------------ > define void @func() { > %a = alloca i32 > store i32 42, i32* %a > call void @func2(i32* %a) nounwind > ret void > } > > define void @func2(i32* %a) nounwind { > store i32 43, i32* %a > ret void > } > ------------ > > It is possible to optimize this to: > >
2008 Jun 11
4
[LLVMdev] Query on optimization and tail call.
Hi, While playing around on the LLVM, I tried this code: int sum(int n) { if (n == 0) return 0; else return n + sum(n-1); } and this is what "llvm-gcc -O2" gave me: define i32 @sum(i32 %n) nounwind { entry: %tmp215 = icmp eq i32 %n, 0 ; <i1> [#uses=1] br i1 %tmp215, label %bb10, label %tailrecurse.bb10_crit_edge tailrecurse.bb10_crit_edge: ; preds =
2010 Jun 16
3
[LLVMdev] Strange pointer aliasing behaviour
I'm hitting a strange pointer aliasing "bug". Here is a test case : /* SOURCE CODE */ #define little_list_size 8 class LittleList1 { public: int _length; double _data[ little_list_size ]; LittleList1( int length ) { _length = length; for( int i=0; i<length; i++ ) _data[i] = 0; } }; class LittleList2 { public: int _length; double _data[ little_list_size ];
2015 Apr 19
2
[LLVMdev] LLVM IR for inline functions
Hi, I have a naive question on how to generate LLVM IR for inline functions. I have compiled this C code: *inline void func1()* * {* * int x=3;* * }* * void func2()* * {* * func1();* * int y = 4;* * }* into LLVM IR, using clang -emit-llvm -S -c <filename> But the generated LLVM IR file does *not* have func1() expanded (see below for the relevant parts). *; Function Attrs: nounwind
2008 Jun 11
0
[LLVMdev] Query on optimization and tail call.
On Tue, Jun 10, 2008 at 11:07 PM, Mahadevan R <mdevan.foobar at gmail.com> wrote: > int sum(int n) > { > return n + sum(n-1); > } > > it generates this: > > define i32 @sum(i32 %n) nounwind { > entry: > %tmp2 = add i32 %n, -1 ; <i32> [#uses=1] > %tmp3 = tail call i32 @sum( i32 %tmp2 ) nounwind ; <i32>
2015 Dec 01
3
LICM doesn't work for IntrReadMem intrinsic function
On 1 December 2015 at 12:33, Xiangyang Guo via llvm-dev <llvm-dev at lists.llvm.org> wrote: > if I have the following IR, LICM doesn't work again, even if I use > '-loop-rotate' firstly. In this IR, the return value of intrinsic function > "foo" is used by another function "func2" as parameter. However, for the > intrinsic function
2013 Oct 29
1
[LLVMdev] JIT'ing 2 functions with inter-dependencies
I am having problems JIT'ing 2 functions where one of them calls the other. (I am using the old JIT interface). Here is the setup: define void @func1() { entrypoint: call void @func2(void) ret void } define void @func2(void) { entrypoint: ret void } (I omit the arguments and function bodies for simplicity.) It's 'func1' that would be called from host code,
2011 Sep 06
2
Generalizing call to function
Hello guys, I would like to ask for help to understand what is going on in "func2". My plan is to generalize "func1", so that are expected same results in "func2" as in "func1". Executing "func1" returns... 0.25 with absolute error < 8.4e-05 But for "func2" I get... Error in dpois(1, 0.1, 23.3065168689948, 0.000429064542600244,
2009 Sep 14
1
[LLVMdev] How to split module?
Hi, all. My question is about how to split one module into N modules(N >= 2)? For example, given the following code: #src.c# int main() { //......// func1(); func2(); //......// return 0; } void func1() { //......// } void func2() { //......// } func1() has no dependence with func2(), so they can perform parallel execution. And I have to split src.c into src1.c
2003 Jun 09
1
Questions for package ts prediction
Dear helpers, I am trying to write a function to return prediction values using package ts. I have written three different versions since I am not sure what's wrong with my func2. func and func1 return the same results.But func1 and func2 don't. In particular, the only difference between "func1" and "func2" is the function variable name being y and data, respectively.
2010 Oct 02
0
[LLVMdev] llvm-py (Python bindings for LLVM), new release 0.6.
Hi Mahadevan, This looks very nice. Is there a good reason to maintain this outside of the LLVM source tree, or is this something you would like to see come in tree? - Daniel On Thu, Sep 2, 2010 at 10:58 PM, Mahadevan R <mdevan.foobar at gmail.com> wrote: > Hi all, > > Thought you might be interested: > > llvm-py 0.6 was released a couple of days back. This release is
2015 Dec 01
2
LICM doesn't work for IntrReadMem intrinsic function
Thanks for your reply, escha, Yes, -loop-rorate makes it work. Regards, Xiangyang 2015-12-01 12:48 GMT-05:00 <escha at apple.com>: > > > On Dec 1, 2015, at 9:30 AM, Xiangyang Guo via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > > > > Hi, All, > > > > Suppose I define one memory read only intrinsic function "foo" in >
2019 May 17
3
Copy Function from one LLVM IR file to another
Hello everyone, I wanted to copy a function from one file to another. The file that I wanted to copy the function into contains a function with the same name and same number of instructions. I decided to just replace the instructions with those of the other function. I am doing all of this from within a function pass. *1.* I created a function pass in which I extract a function using
2000 Sep 06
2
reusing external functions across libs
Hi, I am searching for a way to solve the following problem: I want to use an external function, defined in a dyn.load()ed shared object, in another dyn.load()ed shared object. Currently I have to take the sources (Fortran) from one libraries src/ directory and copy them into the src/ dir of the other library, resulting in two copies of this function. This is bad for maintanance and maybe also
2011 Feb 17
1
Integrate with an indicator function
Hi all, I have some some problem with regard to finding the integral of a function containing an indicator function. please see the code below: func1 <- function(x, mu){ (mu^2)*dnorm(x, mean = mu, sd = 1)*dgamma(x, shape=2)} m1star <- function(x){ integrate(func1, lower = 0, upper = Inf,x)$val} T <- function(x){ 0.3*dnorm(x)/(0.3*dnorm(x)+0.7*m1star(x))} func2 <-
2010 Jun 17
0
[LLVMdev] Strange pointer aliasing behaviour
On Wed, Jun 16, 2010 at 1:39 PM, Pierre C <lists at peufeu.com> wrote: > > I'm hitting a strange pointer aliasing "bug". Here is a test case : > > /* SOURCE CODE */ > > #define little_list_size 8 > > class LittleList1 { > public: >        int     _length; >        double  _data[ little_list_size ]; > >        LittleList1( int length ) >
2016 Sep 21
3
Propagation of debug information for variable into basic blocks.
Adrian, I am currently investigating issues where variables that one would expect to be available in a debugger are not in code that is compiled at optimisations other than -O0 The main problem appears to be with the LiveDebugValues::join() method because it does not allow variables to be propagated into blocks unless all predecessor blocks have an Outgoing Location for that variable. As a
2011 Feb 17
1
Integration with an Indicator Function in R
Hi all, I have some some problem with regard to finding the integral of a function containing an indicator function. please see the code below: func1 <- function(x, mu){ (mu^2)*dnorm(x, mean = mu, sd = 1)*dgamma(x, shape=2)} m1star <- function(x){ integrate(func1, lower = 0, upper = Inf,x)$val} T <- function(x){ 0.3*dnorm(x)/(0.3*dnorm(x)+0.7*m1star(x))} func2 <-
2007 Jun 01
2
Getting names of objects passed with "..."
Is there a tidy way to get the names of objects passed to a function via the "..." argument? rbind/cbind does what I want: test.func1 <- function(...) { nms <- rownames(rbind(..., deparse.level=1)) print(nms) } x <- "some stuff" second <- "more stuff" test.func1(first=x, second) [1] "first" "second" The usual