search for: functionattrspass

Displaying 4 results from an estimated 4 matches for "functionattrspass".

2010 Aug 28
2
[LLVMdev] Dataflow analysis based optimisations
...r stored in a > global, and not returned from the function, then that object is dead > when the function that created the object returns. That sounds ideal; thanks! I assume that I would need to implement my own memory-allocation instruction and then produce a custom pass, running after the FunctionAttrsPass, which would then lower the instructions to either a call to malloc or an alloca instruction. I see vague references to an LLVM malloc instruction; did this disappear after 2.6? -- ┌─── dg@cowlark.com ───── http://www.cowlark.com ───── │ │ "Home is where, when you have to go there, they have...
2010 Aug 28
0
[LLVMdev] Dataflow analysis based optimisations
There are passes which mark function parameters as "nocapture", which means that the function does not store the passed-in pointer for use after that function returns. If pointers to a newly created object are only ever passed through "nocapture" parameters, never stored in a global, and not returned from the function, then that object is dead when the function that created
2010 Aug 28
2
[LLVMdev] Dataflow analysis based optimisations
I'm working on an LLVM-based compiler for a very closure-centric language. It's becoming apparent that it's going to suffer heavily from garbage collector churn, as all the useful programming idioms the language makes possible are going to involve memory allocations, either to create objects or to allocate storage for upvalues. However, it's possible to optimise away a lot of heap
2010 Aug 29
0
[LLVMdev] Dataflow analysis based optimisations
...ot returned from the function, then that object is dead >> when the function that created the object returns. > > That sounds ideal; thanks! > > I assume that I would need to implement my own memory-allocation > instruction and then produce a custom pass, running after the > FunctionAttrsPass, which would then lower the instructions to either a > call to malloc or an alloca instruction. I see vague references to an > LLVM malloc instruction; did this disappear after 2.6? Yes, the LLVM malloc instruction is no more. There might still be an IRBuilder::CreateMalloc, but that now em...