search for: srrajesh1989

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

2019 Jul 10
2
Using bytecode version of std::sort for JIT generated data type
...ode - it'd be in LLVM > IR. You'd import that into the module where the user code was (or copy this > "standard library" LLVM IR module and then add the to-be-JITed code to that > copy, then compile it all together). > > On Mon, Jul 8, 2019 at 8:45 PM Rajesh S R <srrajesh1989 at gmail.com> wrote: > >> >> >> On Mon, Jul 8, 2019 at 4:39 PM David Blaikie <dblaikie at gmail.com> wrote: >> >>> There isn't any magic command for this - you'd have to write some C++ >>> code/a custom LLVM optimization pass. >>&g...
2019 Jul 09
2
Using bytecode version of std::sort for JIT generated data type
...lying on the inliner to create it for you, > essentially) > I don't understand what you mean here. If sort is already generated into machine code based on Compare(void*, void*) { return false; } how can we inject our function here? > > On Mon, Jul 8, 2019 at 4:33 PM Rajesh S R <srrajesh1989 at gmail.com> wrote: > >> Thanks David! >> >> I am not clear on how to achieve this though. Could you give more info on >> this? >> >> I expect something like this: >> >> sort.cc file: >> >> bool Compare(void* a, void* b) { >>...
2019 Jul 08
2
Using bytecode version of std::sort for JIT generated data type
...wrote: > That's an option, for sure - having llvm::Functions you could clone into > your module, replace the call to the Compare function to a call to the > specific comparison you want & the let the optimizers do their work. > > On Wed, Jul 3, 2019 at 4:23 PM Rajesh S R <srrajesh1989 at gmail.com> wrote: > >> Thanks David! I understand that std::sort doesn't exist without types >> especially at bytecode layer. >> >> What I was thinking was something like the following: >> >> Compile std::sort with a thunk function Compare(void*, voi...
2019 Jul 03
2
Using bytecode version of std::sort for JIT generated data type
Thanks David! I understand that std::sort doesn't exist without types especially at bytecode layer. What I was thinking was something like the following: Compile std::sort with a thunk function Compare(void*, void*) {rerturn false} into bytecode with an option say noinline and always make the function call or even a simple unoptimized bytecode which guarantees that Compare exists as a