similar to: [LLVMdev] freeing alloca'd variables before function exits

Displaying 20 results from an estimated 800 matches similar to: "[LLVMdev] freeing alloca'd variables before function exits"

2013 Nov 04
0
[LLVMdev] freeing alloca'd variables before function exits
Stack colouring should be able to reuse the same stack space, if the live ranges of the pointers don't overlap. But I don't think anyone has built a general solution for alloca'd space. On Mon, Nov 4, 2013 at 6:30 AM, Ali Javadi <aj14889 at yahoo.com> wrote: > Hi, > > In my llvm code I want to create some function calls. The function > prototype is as follows: >
2013 Feb 04
2
[LLVMdev] c-like language implementation using llvm
Hi Sean, >> Can I just utilize the i1 type? Is the >> i1 type already used for something, and thus might create a conflict? > > I think you are very confused. LLVM's types are meant to be used to > represent *your* program :) They can't be "already used". I am keeping all the types of C, and adding my new types. I thought that, for example, I can't map
2013 Feb 04
0
[LLVMdev] c-like language implementation using llvm
On Sun, Feb 3, 2013 at 8:55 PM, Ali Javadi <aj14889 at yahoo.com> wrote: > I am keeping all the types of C, and adding my new types. I thought that, > for example, I can't map my new type to i32 because that's used for C > integers. That's what I meant by already used. Am I missing something? If the type behaves like an i32 then use i32. For example, both signed and
2013 May 17
1
[LLVMdev] backend for intrinsic functions
Hi, I have some newly defined intrinsic functions in my llvm IR code, which I want to translate to X86 instruction set. As a first step, I want to be able to generate "nop" for these instructions, so the program at least compiles successfully. The call to my intrinsic function looks like this in the IR: call void @llvm.X(i16 %43) >From what I understand it may be possible to
2013 Jul 18
1
[LLVMdev] Nested Loop Unrolling
Hi, In LLVM (using the opt tool), is it possible to force a nested loop be unrolled entirely? Something like a pass option? I have a nested loop with depth of 4, and all trip counts are known at compile time, but so far I've only been able to do this by 4 invocations of the -loop-simplify, -loop-rotate, -loop-unroll passes. Thanks, Ali
2013 Sep 05
2
[LLVMdev] Optimisation pass to move an alloca'd array to a global constant array
Hi All, I was wondering if there is an optimisation pass that moves a stack allocated array, initialised with constant values, to a global constant array. And if there is such a pass, what requirements are there for it to operate? My optimised IR is below. As you can see an array of 5 integers is created with alloca, then each element is stored to in turn. It would be nice if this array was
2012 Apr 26
2
Memoize and vectorize a custom function
My goal is simple: calcuate GC content of each sequence in a list of nucleotide sequences. I have figured out how to vectorize, but all my attempts at memoization failed. Can you show me how to properly memoize my function? There is a StackOverflow post on the subject of memoization, but it does not help me: http://stackoverflow.com/questions/7262485/options-for-caching-memoization-hashing-in-r
2012 Feb 03
1
rails memoize and reload class => error raised
Hi, That''s a bit off topic but since I use Spork + Rspec... Well, my classes are reloaded between each test wave so Rails'' "memoize" method raises an error (which is expected, see code: http://rubydoc.info/docs/rails/3.0.0/ActiveSupport/Memoizable:memoize) Anyone resolved this issue with an elegant solution?
2003 Aug 02
7
[2.6] Perl weirdness with ext3 and HTREE
Hi I have mailed about this previously, but back then it was not really confirmed, so I have let it be at that. Anyhow, problem is that for some reason 2.5/2.6 ext3 with HTREE support do not like what perl-5.8.0 does during installation. It *seems* like one of the temporary files created during manpage installation do not get unlinked properly, or gets into the hash (this possible?) and cause
2009 Jul 16
0
[LLVMdev] x86 unwind support
On Thu, Jul 16, 2009 at 9:10 AM, Kenneth Uildriks<kennethuil at gmail.com> wrote: > 1. Which ones?  I know that Windows uses it for the "this" pointer. The internal fastcc convention and the Windows fastcall convention off the top of my head. > Anyway, unless the callee is required to preserve it in a given > calling convention, that doesn't preclude us using it for
2009 Jul 16
3
[LLVMdev] x86 unwind support
1. Which ones? I know that Windows uses it for the "this" pointer. Anyway, unless the callee is required to preserve it in a given calling convention, that doesn't preclude us using it for a *return* value. It would be checked after calls return, and wouldn't affect the use of the register for passing values in before the call is made. The callee would set it right before
2006 Apr 15
1
[LLVMdev] how to code a loop in llvm assembly
Hi Simon, > I've read over the "LLVM Language Reference Manual" a few times, and > writing some ll code, but i'm stuck at a very basic point. How to > decrement a counter variable ? As Oscar pointed out, you need a phi-node. I read some of the published papers on LLVM before the Language Reference Manual and found them to be of use. You may also find Wikipedia's
2004 Nov 23
2
[LLVMdev] Restoring SSA form
Hello, for some my use case, I'd like to temporary break SSA property and then ask LLVM to restore it. Here's more details: if (i < 0) { i = -i; } This is a C code example. I'm trying to create a value range analysis, which will determine, that after this code, 'i' is non-negative. In SSA form, this will become i = 0; if (i < 0) { i.2 = -i; }
2008 Mar 13
5
[LLVMdev] exact semantics of 'nounwind'
Hi everyone, Since I'm busy muddying the waters by changing how exception handling works, I thought I should ask for clarification on the exact behaviour of the current 'nounwind' attribute found on functions, calls and invokes. I was thinking these would be similar to the AA analysis notes like "doesNotAccessMemory" which is a provable property of the function or call
2015 Aug 07
2
load instruction erroneously removed by GVN
Hi, I'm having a problem with GVN removing a load instruction that I think is needed. Dump before GVN: *** IR Dump Before Global Value Numbering *** ; Function Attrs: minsize optsize define i16 @TEST__MAIN(i16 %argc.13.par, i16** %argv.14.par) #0 { %buf.17 = alloca [10 x i16], align 1 %_tmp30 = getelementptr inbounds [10 x i16], [10 x i16]* %buf.17, i16 0, i16 0, !dbg !22 call
2015 Oct 01
1
doveadm + ldap userdb
Hi! OS: CentOS Linux release 7.1.1503 (Core) Dovecot: 2.2.18 Run user listing - doveadm user '*', single user - work. auth[20540]: segfault at 8 ip 00007fd554340c6b sp 00007ffc17c886e0 error 4 in libauthdb_ldap.so[7fd55433b000+a000] dovecot: auth: Fatal: master: service(auth): child 20540 killed with signal 11 (core dumped) dovecot: auth: Error: net_connect_unix(auth-worker) failed:
2010 Sep 22
3
Passing a function as a parameter...
R-helpers: If I want to pass a character name of a function TO a function, and then have that function executed, how would I do this? I want an arbitrary version of the following, where any function can be used (e.g. I don't want the if-then statement here): apply_some_function <- function(data,function_name) { if(function_name=="mean") { return(mean(data)) }
2010 Jan 07
0
[LLVMdev] First-class aggregate semantics
On Thursday 07 January 2010 15:28, Dustin Laurence wrote: > I think I'm missing something basic about the semantics of returning an > aggregate type (in my case, a structure) from a function. Returning a > structure containing only compile-time constants is simple enough. But > I don't quite get how this works with a struct composed at run-time. If > I constructed it on
2010 Jan 07
6
[LLVMdev] First-class aggregate semantics
On 01/07/2010 01:38 PM, David Greene wrote: > The way this works on many targets is that the caller allocates stack > space in its frame for the returned struct and passes a pointer to it > as a first "hidden" argument to the callee. The callee then copies > that data into the space pointed to by the address. <nod> > Long-term, first-class status means that
2004 Nov 23
0
[LLVMdev] Restoring SSA form
> > Here's 'foo' is always called with positive value. However, the value > range > assigned to 'i' variable can be only [-inf, +inf], because uses of 'i' > outside of condition can get any value. So, I'd like to convert the > above to: > > i = 0; > if (i > 0) { > i = change_value_range(i); > foo(i); > } I