Displaying 2 results from an estimated 2 matches for "createcompilerllvm1".
2019 Feb 26
2
How to implement function pointer?
Hi, I'm learning to use llvm api to generate IR code, I got two good
tutorials, https://llvm.org/docs/tutorial/ and
https://www.ibm.com/developerworks/library/os-createcompilerllvm1/index.html,
but non of those showed how to implement a function pointer(or at least
there is but I didn't find out).
For example I got a c style code like this:
int foo(int i) {
return ++i;
}
int (*p)(int);
int main() {
p = foo;
p(3);
}
I turn it into IR code and found the sytex of a...
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 adding expressions the the IR that is dumped out.
I’ve added the following snippets:
Value *c1 = ConstantFP::get(context, AP...