similar to: [LLVMdev] Best strategy to add a parameter to a function

Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] Best strategy to add a parameter to a function"

2013 May 21
1
[LLVMdev] Is it valid to add parameters to a function once it is created
I create a function with an empty signature: void llvm_start_new_function() { llvm::outs() << "Staring new LLVM function ...\n"; Mod = new llvm::Module("module", llvm::getGlobalContext()); builder = new llvm::IRBuilder<>(llvm::getGlobalContext()); llvm::FunctionType *funcType = llvm::FunctionType::get(builder->getVoidTy(), false);
2015 Mar 10
4
[LLVMdev] noob IR builder question
I am trying to get a handle on IR builder, at least some basics. I ran through a tutorial here: Create a working compiler with the LLVM framework, Part 1 <http://www.ibm.com/developerworks/library/os-createcompilerllvm1/>, and it worked well enough. I have some simple code that creates a hello world IR. I am trying to now bring in some concepts from the Kaleidoscope tutorial, namely
2016 Mar 14
4
LLVM 3.8 change in function argument lists?
Hi, I am upgrading my project from 3.7 to 3.8. I find that following code used to compile in 3.7 but doesn't in 3.8 and I can't understand why. llvm::Function *mainFunc = ...; auto argiter = mainFunc->arg_begin(); llvm::Value *arg1 = argiter++; arg1->setName("obj"); But if I change the code to following it compiles: auto argiter = mainFunc->arg_begin(); llvm::Value
2005 Jun 07
5
Functions within functions in R and S-Plus
Sorry to bother you about a S-Plus related problem, but I hope someone can help. I have tried to "translate" some code from R to S-Plus (I have colleague that insists on using S-Plus. And yes, I have tried to make him change to R...) The following code works out fine in R, but in S-Plus (S-PLUS 6.2 for Windows Professional Ed.) I get the error message "Problem in est.theta(x):
2007 Jul 24
1
Passing equations as arguments
Friends, I'm trying to pass an equation as an argument to a function. The idea is as follows. Let us say i write an independent function Ideal Situation: ifunc <- function(x) { return((x*x)-2) } mainfunc <- function(a,b) { evala <- ifunc(a) evalb <- ifunc(b) if (evala>evalb){return(evala)} else return(evalb) } Now I want to try and write this entire program in a single
2015 Jun 22
2
[LLVMdev] bb-vectorizer transforms only part of the block
The loads, stores and float arithmetic in attached function should be completely vectorizable. The bb-vectorizer does a good job at first, but from instruction %96 on it messes up by adding unnecessary vectorshuffles. (The function was designed so that no shuffle would be needed in order to vectorize it). I tested this with llvm 3.6 with the following command:
2019 Jul 08
2
Problem with the LLVM v8.0 IR 'select' instruction
Hi again, It is probably me doing something wrong, but I have attached a trimmed down sample that shows the issue and the output that Clang 8.0.0 makes (using the binary release from llvm.org). I invoke clang as follows: clang -S -O3 -o Evergrowing.s -Wall Evergrowing.ll I tried using -O1, -O2, and -O3, but all where the same. Please notice that I renamed 'main()' to
2015 Jul 01
3
[LLVMdev] SLP vectorizer on AVX feature
I seem to have problem to get the SLP vectorizer to make use of the full 8 floats available in a SIMD vector on a Sandy Bridge CPU with AVX. The function is attached, the CPU flags are: flags : fpu vme de pse tsc msr pae mce cx8 apic mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good
2015 May 09
4
[LLVMdev] [LSR] hoisting loop invariants in reverse order
Hi, I was tracking down a performance regression and noticed that LoopStrengthReduce hoists loop invariants (e.g., the initial formulae of indvars) in the reverse order of how they appear in the loop. This reverse order creates troubles for the StraightLineStrengthReduce pass I recently add. While I understand ultimately SLSR should be able to sort independent candidates in an optimal order,
2005 Dec 21
1
ustack() issues && correlating SIGSEGV activity?
Howdy, I was playing around with the malloc/free D script provided by Philip Beevers: http://www.opensolaris.org/jive/thread.jspa?threadID=4224&tstart=15 And decided to change the free:entry probe from: pid24169::free:entry / sz[arg0] / { printf("Freeing %p (size %d)\n", arg0, sz[arg0]); sz[arg0] = 0; } to: pid24169::free:entry / ! sz[arg0] / { printf("[ *
2005 Sep 27
2
Invalid address error message
Hi, I ran a d-program with syscall::open:entry probe but got the following error messages sometimes: dtrace: error on enabled probe ID 1 (ID 14: syscall::open:entry): invalid address (0xff34e000) in predicate at DIF offset 76 dtrace: error on enabled probe ID 6 (ID 14: syscall::open:entry): invalid address (0xff34e000) in predicate at DIF offset 28 I don''t know how to interpret these
2007 Aug 01
2
getting hex out of ints
I have a probe: pid111::myfunc:entry { self->arg = arg0; } pid111::myfunc:return /self->arg/ { @[self->arg] = quantize(); } works great, but i''d like arg0 to be printed in hex. I''ve tried numerous approaches to do this but i''ve hit a wall every time. I''ve tried: 1) self->arg = sprintf(arg0); no, cuz dtrace has no sprintf 2) self->arg
2009 Jun 24
1
Qualified parameters in SOAP body using .SOAP
Hello, I am trying to reach a web service using the SOAP package. I succeeded calling the web service, but not sending parameters to it. After much research and tries, I think I found that the problem lies in the namespace including the parameters in the SOAP body. In short, my question is: how can I send unqualified parameters in the SOAP body of a call produced through the SOAP package?
2010 Mar 19
2
Using DTrace in 32-bit to handle 64-bit parameters [72631230]
Hi all, OK, so this at first looked like a clear cut "Don''t do it, or at worst handle the results" issue my customer has come to me with, but the more we discuss it, the more it looks like we should have better ways of dealing with this issue. > We have user defined dtrace probe points in the application which use > as parameter 64 bit values: > > provider adv {
2014 Mar 25
2
[LLVMdev] Alignment of pointee
Hi all, Is there a way to express in the IR that a pointer's value is a multiple of, say, 32 bytes? I.e. the data the pointer points to has an alignment of 32 bytes. I am not meaning the natural alignment determined by the object's size. I am talking about a double* pointer and like to explicitly overestimate the alignment. I am trying to add this pointer as a function's
2006 Sep 06
3
Dtrace Snooping
Dear dtrace Experts, I have seen some dtrace utilities like opensnoop and execsnoop etc. My interest is to write a simple script that can snoop the files which uses the 3 syscalls like open,create,unlink. I have gone through dtrace oneliners that can do the same : dtrace -n ''syscall::open*:entry { printf("%s %s",execname,copyinstr(arg0));}'' dtrace -n
2011 Mar 15
2
[LLVMdev] Kinda noob questions
Hi all, I have 2 simple questions... First, just for you to know, I'm making a compiler (kinda obvious) and the language definition is mine, so there is no much constraint for me, it's written in Java (it generates a .ll file as output) and it's just for fun by now, maybe a serious project after I learn all the stuff needed... and sorry bad english 1) I want to know if when I do
2007 Apr 26
1
requiring array indices be int64_t
With dtrace, I can use function arguments in the form of arg0, arg1, etc, as indices into an "associative" array. If all that an array takes as an index is an int64_t, is there any reason for dtrace to require me to have an explicit type conversion in there rather than having it do it for me automatically? At present I need to do: mblks[arg0] or mblks[(int64_t)((mblk_t
2015 May 18
2
[LLVMdev] [LSR] hoisting loop invariants in reverse order
It's not caused by "the insertion point is set to the default after". I should mention the reason somewhere earlier. "Reversing the order of arg0~3 is not intentional. The user list of pixel_idx happens to have pixel_idx+3, pixel_idx+2, and pixel_idx+1 in this order, so LSR simply follows this order when collecting the LSRFixups." I'm not an expert on uselist orders,
2011 Mar 15
0
[LLVMdev] Kinda noob questions
On 3/14/11 7:52 PM, Judison wrote: > Hi all, > > I have 2 simple questions... > > First, just for you to know, I'm making a compiler (kinda obvious) and > the language definition is mine, so there is no much constraint for > me, it's written in Java (it generates a .ll file as output) and it's > just for fun by now, maybe a serious project after I learn all