Secondly, I'm trying to detect a particular function type in order to compile to IR with a different kind of function call that doesn't save anything to the stack. Do you have any advice to narrow down what the type of the function is? not just the return type/parameters. Also how do I change the CCallConv of the function in irgen/call.go?
Thank you for all your help!
Willem
Firstly, I've installed Ccache, but it still takes quite a while to compile llgo when I make changes to it. Is there a way to speed up compilation. I've used make -j install.
Secondly, I'm trying to detect a particular function type in order to compile to IR with a different kind of function call that doesn't save anything to the stack. Do you have any advice to narrow down what the type of the function is? not just the return type/parameters. Also how do I change the CCallConv of the function in irgen/call.go?
Thank you for all your help!
Willem
--
You received this message because you are subscribed to the Google Groups "llgo-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to llgo-dev+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Thanks for the reply. I looked at using *types.Named because the function I wanted to filter is a named type. From there I'm just comparing the string of the name. Not the best, but it'll do.
As for changing the function call to IR, I'm not sure which value to use that function with nor how to make sure I meet the C ABI requirements. Could you explain that a little more?
Currently I have a monadic loop such that a function each iteration is set equal to the same function but given the state as an input.
i.e. f = f(s)
so since the only parameter that is passed to each function is s we don't need to make real function calls that save state, but rather I would like the functions to be sown together.
If I understand your explanation correctly, I don't think what I want will break it. Since f is a function which "returns" the next function it will be jumps between void functions.
I've had one compilers course but it was in java for a very simple virtual machine. I'm excited to learn more about llvm.
I would like also to learn more about making functional languages and my application is similar to tail end recursion detection. I was reading about the different function calls in IR and some were meant for it, but were missing in the enum in llvm go bindngs. Is there no way for me to add that to llvm go?