search for: 7144733

Displaying 5 results from an estimated 5 matches for "7144733".

2011 Aug 22
0
[LLVMdev] Accessing arguments in a caller
...stack. This way you only need to copy a single > pointer. This is what GCC's nested function implementation does for example to > enable child functions to access variables on the parent's stack. Hi Duncan, this is what I'm already doing (see http://stackoverflow.com/questions/7144733/argument-forwarding-in-llvm, the code I posted is in pseudo-C but I'm actually working on LLVM-IR in my pass) but this in curs the boxing-unboxing penalty and I was wondering if there is a way to avoid it. -------------- next part -------------- A non-text attachment was scrubbed... Name: ca...
2011 Aug 22
2
[LLVMdev] Accessing arguments in a caller
Hi Carlo, rather than declaring individual stack variables int x; int y; int z; and so on, which requires you to pass each one, or a pointer to each one, to your function, declare one stack variable of struct type that holds them all: struct StackObjects { int x; int y; int z; ... }; ... struct StackObjects stack; then pass the address of stack to your
2011 Aug 22
1
[LLVMdev] Accessing arguments in a caller
...need to copy a single >> pointer. This is what GCC's nested function implementation does for example to >> enable child functions to access variables on the parent's stack. > > Hi Duncan, > this is what I'm already doing (see > http://stackoverflow.com/questions/7144733/argument-forwarding-in-llvm, the code > I posted is in pseudo-C but I'm actually working on LLVM-IR in my pass) but this in > curs the boxing-unboxing penalty and I was wondering if there is a way to avoid it. I didn't read your question carefully enough: I thought you were talking a...
2011 Aug 22
0
[LLVMdev] Accessing arguments in a caller
...y I was hoping that LLVM-IR had a better way of doing such things (I mean, telling the backend that I need to access the stack frame of the caller). BTW, I posted the same question on SO, along with some (pseudo-) code to explain what I'm doing right now: http://stackoverflow.com/questions/7144733/argument-forwarding-in-llvm -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110822/8b21ac8e/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: cafxx.vcf Ty...
2011 Aug 21
2
[LLVMdev] Accessing arguments in a caller
What I can think of: 1. Anonymous struct, to avoid a copy. 2. Use stdarg.h...dangerous but accomplishes what you're looking for. 3. Split up F: giant switch statements often indicate that your function is doing several different things. (IMHO...) 4. Don't worry about it, it's probably not a bottleneck. (Or rather, profile first...) But no, there's no standard way to do this. Even