-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
more complex examples? #2
Comments
Hi Noa,
I will add a small test covering this case, with a vector trying to trigger loop unrolling depending on the vector's size. Thanks!
I did not understand. What do you mean? I would like to add a mechanism to specify a function to transform the IR (code below). Is it something like this that you had in mind? void instrument_edges(TerminatorInst* Term) { /*add instrumentation calls*/ }
easy::jit(foo, _2, _1,
easy::after_optimization([](BasicBlock* B) {
instrument_edges(B->getTerminator());
return true;
})) Thanks, |
Hi Juan, It would be great to have the loop unrolling example, thanks! As for the other example I mentioned, I think I was not very clear at all. Let me give an example: Let's say that I have a method that iterates over a set of elements: void apply(...) { then I have a set of functions, for example add, subtract, divide. the examples in your jit seems to let me create new functions like add5(x), etc... could I jit a method that had semantics in which, say, 5, was added to each element in the container. e.g. apply(add5); ? |
I really like this idea. I think I know how to implement it. I will add it to the TODO.md . |
Hello Noah, Cheers, |
The composition of the generated functions is now supported! Cheers! |
the idea behind his project is really cool. very nice work.
i've been looking at some of the examples, and i'm wondering if you have any more complex examples of the functions that can be jit compiled. it looks like all the examples (maybe im missing some?) are all just doing basic variable value substitution before the jit compile step. i'm wondering about loop unrolling (e.g. if a vector is the parameter), or perhaps changing control flow to build expressions.
The text was updated successfully, but these errors were encountered: