Displaying 20 results from an estimated 4000 matches similar to: "[LLVMdev] LLVM IR for inline functions"
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
2015 May 07
2
[LLVMdev] Integer ID for LLVM::Instruction*?
David,
As you suggested, I try to compile the following test code:
*include "llvm/IR/Instruction.h"#include "stdint.h"extern void
callback(intptr_t);void foo(){ llvm::Instruction* i; intptr_t
zzzz=static_cast<intptr_t>(i); callback(zzzz);}*
but got this compilation error:
* 'intptr_t' (aka 'long') is not allowed intptr_t
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
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.
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 <-
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 <-
2015 May 06
5
[LLVMdev] Integer ID for LLVM::Instruction*?
Hi,
I wonder whether we can easily retrieve an LLVM instruction ID that
uniquely identifies the instruction. In my case, I need to avoid using
llvm::Instruction* directly. Given an 'inst' of type llvm::instruction*, is
there some readily usable method as simple as "int id = inst->id( )"?
Thanks.
Zhoulai
-------------- next part --------------
An HTML attachment was
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
2016 Aug 13
2
A "hello world" coverage sanitizer
Thank you, kcc. I am unsure if I misunderstand your reply. It seems that
trace-bb, rather than trace-pc, fits better for my problem, given that my
instrumentation is to put before each conditional statement. Do I
misunderstand something here?
"
Tracing basic blocks
<http://clang.llvm.org/docs/SanitizerCoverage.html#id11>
With -fsanitize-coverage=trace-bb the compiler will insert
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 ];
2009 Mar 30
1
[LLVMdev] Determining the base offset of the stack for a function.
I am running into an issue where if I have multiple functions compiled
in the same compilation unit the stack offset is not starting at zero.
For example:
func1(...)
{
...
}
func2(...)
{
...
}
Say the first function uses 64 bytes of the stack and an assumed offset
of 0 and the second function uses 32 bytes of the stack but an assumed
offset of 64. I've found out how to get the
2012 Sep 27
1
Is there a way to source from a specific Git repository without hardcoding the location everywhere?
Folks,
A small group of us are working together to develop a set of R functions
to support data management and analysis using Eclipse/StatET in a Windows
environment. We are using Git/EGit for version control. We work within
our own repository and occasionally push to a common remote location.
I'd like to have the code source files from the 'local' git repository
without
2018 Jan 11
1
LLVM EH tables much larger than GCC's
On Wed, Jan 10, 2018 at 5:21 AM, James Y Knight <jyknight at google.com> wrote:
>
> On Fri, Jan 5, 2018 at 9:58 PM, Ryan Prichard via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
>
>> 2. *Termination landing pads.*
>>
>> Clang sometimes uses a landing pad that calls __clang_call_terminate to
>> terminate the program. GCC instead leaves a gap in
2015 Jul 24
2
[LLVMdev] Transforming SwitchInst to BranchInst
Hi,
Are there some built-in LLVM transformation pass, or written library code
that transforms LLVM::SwitchInst into if-condition statements (LLVM::
BranchInst)?
The purpose of the transformation is that we have a legacy program analyzer
that includes an LLVM pass manipulating if-condition statements. Statements
of LLVM::SwithchInst should have been handled in the same manner but was
not done.
2015 Jun 07
2
[LLVMdev] Loop Unfolding in LLVM
Hello,
I am looking for a loop unfolding procedure implemented in LLVM that helps
to transform a while-loop to n-layer If-statements. The transformation
should be on IR, although the example below is illustrated on the source
level.
original loop:
* WHILE (condition) DO
action
ENDWHILE*
Expected unfolded loop (2-layer):
* IF (condition) THEN*
* action*
* IF
2007 Nov 26
3
Communicating from one function to another
My question is a seemingly simple one. I have a bunch of user-defined
functions which compute such-and-such objects. I want to be able to define a
variable in a particular function, then make use of it later, perhaps in a
different function, without necessarily having to move it around in argument
lists. In the C community, it would be called a "global" variable.
Question 1: Is this
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,
>
2018 Jul 22
2
Finding scratch register after function call
Thanks Bruce,
and elaborately as ever. Again, I'm surprised about your very thorough
Z80 knowledge when you said you only did little on the ZX81 in the
eighties :D
OK, understood. I was first thinking about doing something like this for
small frames:
1. push bc # 1 byte; 11 cycles - part of call frame-cleanup: save
scratch register
+-----begin call-related
2. ld