Displaying 20 results from an estimated 4000 matches similar to: "[LLVMdev] Generating New Functions"
2013 Oct 14
0
[LLVMdev] Generating New Functions
On 10/14/13 5:53 AM, Abhinash Jain wrote:
> How can I generate a new function at compile time and insert some instruction
> onto it, through llvm pass.
> eg.
>
> 1) %y = alloca i32, align 4
> 2) %z = alloca i32, align 4
> 3) %t = alloca i32, align 4
> 4) %2 = load i32* %y, align 4
> 5) %3 = load i32* %z, align 4
> 6) %add = add nsw i32 %2, %3
> 7) %4 = load
2017 Aug 07
2
vrp
I am primarily interested in phi nodes and their induction variables, in
ValueTracking file there is an analysis of them, but if the upper bound is
inf, it is not working?
2017-08-07 11:41 GMT+02:00 Anastasiya Ruzhanskaya <
anastasiya.ruzhanskaya at frtk.ru>:
> So, it is not supported to determine by this instruction : %cmp = icmp slt
> i32 %i.03, 99,
> that %i.03 = phi i32 [ 0,
2013 Apr 23
2
[LLVMdev] 'loop invariant code motion' and 'Reassociate Expression'
Hi,
I am investigating a performance degradation between llvm-3.1 and llvm-3.2
(Note: current top-of-tree shows a similar degradation)
One issue I see is the following:
- 'loop invariant code motion' seems to be depending on the result of the 'reassociate expression' pass:
In the samples below I observer the following behavior:
Both start with the same expression:
%add = add
2013 Apr 23
0
[LLVMdev] 'loop invariant code motion' and 'Reassociate Expression'
As far as I can understand of the code, the Reassociate tries to achieve
this result by its "ranking" mechanism.
If it dose not, it is not hard to achieve this result, just restructure
the expression in a way such that
the earlier definition of the sub-expression is permute earlier in the
resulting expr.
e.g.
outer-loop1
x=
outer-loop2
y =
2012 Apr 05
4
Appropriate method for sharing data across functions
In trying to streamline various optimization functions, I would like to have a scratch pad
of working data that is shared across a number of functions. These can be called from
different levels within some wrapper functions for maximum likelihood and other such
computations. I'm sure there are other applications that could benefit from this.
Below are two approaches. One uses the <<-
2013 Apr 25
2
[LLVMdev] 'loop invariant code motion' and 'Reassociate Expression'
It's an interesting problem.
The best stuff I've seen published is by Cooper, Eckhart, & Kennedy, in
PACT '08.
Cooper gives a nice intro in one of his lectures:
http://www.cs.rice.edu/~keith/512/2012/Lectures/26ReassocII-1up.pdf
I can't tell, quickly, what's going on in Reassociate;
as usual, the documentation resolutely avoids giving any credit for the
ideas.
Why is that?
2013 Apr 25
0
[LLVMdev] 'loop invariant code motion' and 'Reassociate Expression'
On Apr 25, 2013, at 10:51 AM, Preston Briggs <preston.briggs at gmail.com> wrote:
> It's an interesting problem.
> The best stuff I've seen published is by Cooper, Eckhart, & Kennedy, in PACT '08.
> Cooper gives a nice intro in one of his lectures: http://www.cs.rice.edu/~keith/512/2012/Lectures/26ReassocII-1up.pdf
> I can't tell, quickly, what's going on
2015 Aug 21
3
unset() function?
Does R have a function like the S/S++ unset() function?
unset(name) would remove 'name' from the current evaluation
frame and return its value. It allowed you to safely avoid
some memory copying when calling .C or .Call.
E.g., suppose you had C code like
#include <R.h>
#include <Rinternals.h>
SEXP add1(SEXP pX)
{
int nProtected = 0;
int n = Rf_length(pX);
2004 Aug 09
1
[LLVMdev] API on JIT, code snippets
Valery,
First response of several.
I don't know why the demo page at UIUC is unavailable but there is an enhanced
copy of it running on the mirror at http://llvm.x10sys.com/demo/ if you ever
need it. Running it produced the following LLVM equivalent for the C code in
your example.
implementation ; Functions:
int %add1(int %x) {
entry:
%tmp.1 = add int %x, 1 ; <int> [#uses=1]
2013 May 14
1
problem in add1's F statistic when data contains NAs?
Shouldn't the F statistic (and p value) for the x2 term in the following calls
to anova() and add1() be the same? I think anova() gets it right and add1()
does not.
> d <- data.frame(y=1:10, x1=log(1:10), x2=replace(1/(1:10), 2:3, NA))
> anova(lm(y ~ x1 + x2, data=d))
Analysis of Variance Table
Response: y
Df Sum Sq Mean Sq F value Pr(>F)
x1 1
2013 Jun 25
1
F statistic in add1.lm vs add1.glm
Should the F statistic be the same when using add1() on models created by lm and glm(family=gaussian)?
They are in the single-degree-of-freedom case but not in the multiple-degree-of-freedom case.
MASS:addterm shows the same discrepancy. It looks like the deviance (==residual sum of squares) gets
divided by the number of degrees of freedom for the term twice in add1.glm. Using anova() on the
2010 Jan 18
1
[LLVMdev] JIT on ARM
Hi.
I am trying to run LLVM with JIT on ARM processor (Android phone).
Currently I have problems using external functions. Any call to external function crashes and gives me signal 11 (SIGSEGV) at some random address.
I'm trying to run following C code:
***
extern void add1(int* x);
int main()
{
int a = 10;
int b = 20;
add1(&b);
int c = a + b;
return c;
}
***
It gives
2004 Aug 09
0
[LLVMdev] API on JIT, code snippets
On Mon, 9 Aug 2004, Reid Spencer wrote:
> Attached are three files: "valery.cpp" which contains your original, "reid.cpp"
> which contains corrections to most of the FIXME items and "diffs" which shows
> the differences between them. The differences should be instructive on what to
> do. You were really, really close .. just a few details changing. The
2004 Aug 09
5
[LLVMdev] API on JIT, code snippets
Valery,
Attached are three files: "valery.cpp" which contains your original, "reid.cpp"
which contains corrections to most of the FIXME items and "diffs" which shows
the differences between them. The differences should be instructive on what to
do. You were really, really close .. just a few details changing. The code in
"reid.cpp" compiles but I
2005 Jan 14
1
S3/S4 classes performance comparison
Hi R-devel,
If you did read my survey on Rhelp about reporting, you may have seen that
I am implementing a way to handle outputs for R (mainly target output
destinations: xHTML and TeX).
In fact: I does have something that works for basic objects, entirely done
with S4 classes, with the results visible at:
http://www.stat.ucl.ac.be/ROMA/sample.htm
http://www.stat.ucl.ac.be/ROMA/sample.pdf
To
2017 Aug 07
2
vrp
Hello,
I am trying to figure out, what vrp propagation does in llvm. I tried this
program:
#include <stdio.h>
int main() {
int s = 0;
int j = 0;
for (int i = 0; i < 100; i++) {
j = j+i+1;
s+=j;
}
return (s+j);
}
And got this under optimized version ( I don't want everything to be
eliminated)
define i32 @main()
2008 May 13
1
R help: problems with step function
Dear List Members,
I have encountered two problems when using the step function to
select models. To better illustrate the problems, attached is an
R image which includes the objects needed to run the code attached.
lm.data.frame have factor variables with 3 levels.
The following run shows the first problem. AICs (* and **) are different.
I noticed that the Df for rs13482096:rs13483699 is 4,
2006 Apr 14
2
[LLVMdev] Re: standalone llvm
On Thu, 13 Apr 2006 18:07:42 +0200
Oscar Fuentes <oscarfv at telefonica.net> wrote:
>
> Simon Burton <simon at arrowtheory.com> writes:
>
> > I'm trying to take assembly and create machine code I can execute.
> > How close am I ?
>
> Your test case is not complete. Besides, which version of llvm are you
> using? What are the commands for compiling
2006 Apr 13
2
[LLVMdev] standalone llvm
On Wed, 12 Apr 2006 23:02:12 -0500 (CDT)
Chris Lattner <sabre at nondot.org> wrote:
>
> > I'd like to directly create executable code that i can
> > stick in memory somewhere and jump into (call).
>
> Take a look at the llvm/examples directory. There are several small
> programs that create LLVM IR on the fly and JIT compile it.
I'm trying to take
2007 Mar 13
3
inconsistent behaviour of add1 and drop1 with a weighted linear model
Dear R Help,
I have noticed some inconsistent behaviour of add1 and drop1 with a
weighted linear model, which affects the interpretation of the results.
I have these data to fit with a linear model, I want to weight them by
the relative size of the geographical areas they represent.
_________________________________________________________________________________________
> example